diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-04-29 15:52:55 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-04-29 15:52:55 +0200 |
commit | d4af9d6b87cfbddf1ae920e98766c924a4625495 (patch) | |
tree | 017ce147a20018c5fd8df800745f88ff18c3be0c /src/main | |
parent | 500d4294b589c0ba78e30a34a2854d611a2d5d73 (diff) |
some OTR fixes
Diffstat (limited to 'src/main')
4 files changed, 15 insertions, 22 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Conversation.java b/src/main/java/de/pixart/messenger/entities/Conversation.java index 705b14cc3..a6c79050c 100644 --- a/src/main/java/de/pixart/messenger/entities/Conversation.java +++ b/src/main/java/de/pixart/messenger/entities/Conversation.java @@ -768,8 +768,10 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl defaultEncryption = Message.ENCRYPTION_NONE; } int encryption = this.getIntAttribute(ATTRIBUTE_NEXT_ENCRYPTION, defaultEncryption); - if (encryption == Message.ENCRYPTION_OTR || encryption < 0) { + if (encryption < 0) { return defaultEncryption; + } else if (encryption == Message.ENCRYPTION_OTR) { + return encryption; } else { return encryption; } diff --git a/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java b/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java index 5deea0f6a..06ab8ec89 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java @@ -811,15 +811,9 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio intent.putExtra("contact", conversation.getContact().getJid().asBareJid().toString()); intent.putExtra(EXTRA_ACCOUNT, conversation.getAccount().getJid().asBareJid().toString()); switch (menuItem.getItemId()) { - case R.id.scan_fingerprint: - intent.putExtra("mode", VerifyOTRActivity.MODE_SCAN_FINGERPRINT); - break; case R.id.ask_question: intent.putExtra("mode", VerifyOTRActivity.MODE_ASK_QUESTION); break; - case R.id.manual_verification: - intent.putExtra("mode", VerifyOTRActivity.MODE_MANUAL_VERIFICATION); - break; } startActivity(intent); return true; diff --git a/src/main/res/layout/activity_verify_otr.xml b/src/main/res/layout/activity_verify_otr.xml index 1617b8e26..bd5e04b29 100644 --- a/src/main/res/layout/activity_verify_otr.xml +++ b/src/main/res/layout/activity_verify_otr.xml @@ -2,7 +2,7 @@ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@color/grey50"> + android:background="?attr/color_background_secondary"> <ScrollView android:layout_width="fill_parent" @@ -34,7 +34,7 @@ android:id="@+id/your_fingerprint" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textColor="@color/black87" + android:textColor="?attr/text_Color_Main" android:textSize="?attr/TextSizeBody" android:typeface="monospace" android:fontFamily="monospace" /> @@ -43,7 +43,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/your_fingerprint" - android:textColor="@color/black54" + android:textColor="?attr/text_Color_Main" android:textSize="?attr/TextSizeInfo" /> <TextView @@ -51,7 +51,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="20dp" - android:textColor="@color/black87" + android:textColor="?attr/text_Color_Main" android:textSize="?attr/TextSizeBody" android:typeface="monospace" android:fontFamily="monospace" /> @@ -61,7 +61,7 @@ android:layout_height="wrap_content" android:layout_marginBottom="20dp" android:text="@string/remote_fingerprint" - android:textColor="@color/black54" + android:textColor="?attr/text_Color_Main" android:textSize="?attr/TextSizeInfo" /> </LinearLayout> @@ -79,7 +79,7 @@ android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:text="@string/verified" - android:textColor="@color/black87" + android:textColor="?attr/text_Color_Main" android:textSize="?attr/TextSizeHeadline" android:textStyle="bold" android:visibility="gone" /> @@ -89,7 +89,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="8dp" - android:textColor="@color/black87" + android:textColor="?attr/text_Color_Main" android:textSize="?attr/TextSizeBody" android:textStyle="bold" android:visibility="gone" /> @@ -101,8 +101,8 @@ android:layout_marginBottom="8dp" android:hint="@string/shared_secret_hint" android:inputType="textAutoComplete" - android:textColor="@color/black87" - android:textColorHint="@color/black54" + android:textColor="?attr/text_Color_Main" + android:textColorHint="?attr/colorAccent" android:textSize="?attr/TextSizeBody" /> <EditText @@ -112,8 +112,8 @@ android:layout_marginTop="8dp" android:hint="@string/shared_secret_secret" android:inputType="textPassword" - android:textColor="@color/black87" - android:textColorHint="@color/black54" + android:textColor="?attr/text_Color_Main" + android:textColorHint="?attr/colorAccent" android:textSize="?attr/TextSizeBody" /> </LinearLayout> </LinearLayout> @@ -139,7 +139,7 @@ android:layout_height="fill_parent" android:layout_marginBottom="7dp" android:layout_marginTop="7dp" - android:background="@color/black12" /> + android:background="?attr/color_background_primary" /> <Button android:id="@+id/right_button" diff --git a/src/main/res/menu/verification_choices.xml b/src/main/res/menu/verification_choices.xml index 57d45dcde..cad8dee9a 100644 --- a/src/main/res/menu/verification_choices.xml +++ b/src/main/res/menu/verification_choices.xml @@ -2,9 +2,6 @@ <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item - android:id="@+id/scan_fingerprint" - android:title="@string/scan_qr_code" /> - <item android:id="@+id/ask_question" android:title="@string/ask_question" /> |