Removed the save button in the profile fragment.

Replaced the 9-patches for the chat bubbles.
Translated the error message for invalid login credentials.
This commit is contained in:
Lyndon
2017-10-19 13:05:12 +02:00
parent 53dd4a07c3
commit 3d937ec66d
30 changed files with 25 additions and 17 deletions

View File

@@ -201,7 +201,7 @@ public class LoginPresenter extends MVPAbstractPresenter<LoginView> implements L
switch(ErrorUtils.getErrorType(throwable)) {
case DATA_INPUT:
if (errorThrowable.getError().loginFailed != null && errorThrowable.getError().loginFailed.size() > 0) {
getView().showError(errorThrowable.getError().loginFailed.get(0));
getView().showError(R.string.error_invalid_login_credentials);
return;
}
case WRONG_CHATCODE:
@@ -477,7 +477,7 @@ public class LoginPresenter extends MVPAbstractPresenter<LoginView> implements L
String chatCode = mChatCodePreference.get();
String customerId = mAccountNumberPreference.get();
String userId = (mIsEmployee.get() ? "E" : "C") + mUserIdReference.get().toString();
String userId = mUserIdReference.get().toString();
Subscription subscription = mLoginService.verifyChatCode(customerId, userId, chatCode)
.compose(RxUtils.provideDefaultTransformer())

View File

@@ -16,7 +16,7 @@ import de.beyondsoft.ownchat.page.login.LoginActivity;
import de.beyondsoft.ownchat.page.login.LoginPresenter;
import de.beyondsoft.ownchat.page.profile.ProfileFragment;
import de.beyondsoft.ownchat.utils.Constants;
import de.beyondsoft.ownchat.utils.DialogHandler;
import de.beyondsoft.ownchat.utils.DialogHandler;/**/
import de.beyondsoft.ownchat.utils.SystemUtils;
import de.beyondsoft.ownchat.utils.Utils;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 540 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 632 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 677 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 479 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -19,12 +19,12 @@
app:layout_behavior="de.beyondsoft.ownchat.utils.ui.LayoutBehavior">
<EditText
android:id="@+id/login_chat_code"
android:id="@+id/login_account"
style="@style/AppTheme.EditText"
android:layout_width="match_parent"
android:background="@drawable/shape_round_top_corners"
android:hint="@string/login_chat_code_hint"
android:inputType="text" />
android:hint="@string/login_account_number_hint"
android:inputType="number" />
<View
android:id="@+id/login_divider1"
@@ -33,12 +33,12 @@
android:background="@color/colorDivider" />
<EditText
android:id="@+id/login_account"
android:id="@+id/login_chat_code"
style="@style/AppTheme.EditText"
android:layout_width="match_parent"
android:background="@color/colorWhite"
android:hint="@string/login_account_number_hint"
android:inputType="number" />
android:hint="@string/login_chat_code_hint"
android:inputType="text" />
<View
android:id="@+id/login_divider2"

View File

@@ -64,6 +64,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/activity_horizontal_margin"
android:text="@string/profile_save_button" />
android:text="@string/profile_save_button"
android:visibility="invisible"/>
</LinearLayout>

View File

@@ -22,6 +22,7 @@
<RelativeLayout
style="@style/LeftChatItemRelativeLayout"
android:padding="7dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
@@ -74,8 +75,9 @@
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:visibility="gone"
custom:donut_finished_color="@color/colorWhite"
custom:donut_text_color="@color/colorBlack" />
custom:donut_finished_color="@color/colorDefault"
custom:donut_text_color="@color/colorBlack"
tools:visibility="visible"/>
<hani.momanii.supernova_emoji_library.Helper.EmojiconTextView
android:id="@+id/chat_item_message"

View File

@@ -25,6 +25,7 @@
<RelativeLayout
style="@style/RightChatItemRelativeLayout"
android:padding="7dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"

View File

@@ -12,6 +12,7 @@
<RelativeLayout
style="@style/LeftChatItemRelativeLayout"
android:padding="7dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
@@ -51,8 +52,9 @@
android:layout_below="@id/chat_item_time"
android:layout_marginTop="4dp"
android:visibility="gone"
custom:donut_finished_color="@color/colorWhite"
custom:donut_text_color="@color/colorBlack" />
custom:donut_finished_color="@color/colorDefault"
custom:donut_text_color="@color/colorBlack"
tools:visibility="visible"/>
<hani.momanii.supernova_emoji_library.Helper.EmojiconTextView
android:id="@+id/chat_item_message"

View File

@@ -18,7 +18,8 @@
<RelativeLayout
style="@style/RightChatItemRelativeLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:padding="7dp">
<TextView
android:id="@+id/chat_item_sending_failed"

View File

@@ -64,6 +64,7 @@
<string name="error_deactivated_chat_code">Chat-Code ist deaktiviert</string>
<string name="error_chat_code_too_short">Chat-Code hat eine falsche Länge</string>
<string name="error_token_validation_failed">Bitte stellen Sie sicher, dass Sie mit dem Internet verbunden sind.</string>
<string name="error_invalid_login_credentials">Ungültige Anmeldedaten</string>
<!-- Permissions -->
<string name="permission_grant">Erlauben</string>

View File

@@ -102,11 +102,11 @@
</style>
<style name="RightChatItemRelativeLayout">
<item name="android:background">@drawable/chat_right</item>
<item name="android:background">@drawable/chat_right_v2</item>
</style>
<style name="LeftChatItemRelativeLayout">
<item name="android:background">@drawable/chat_left</item>
<item name="android:background">@drawable/chat_left_v2</item>
</style>
</resources>