From 50fb7867d7e70cf47ee7ba2f13c299c7702dd8c0 Mon Sep 17 00:00:00 2001 From: John Lewis Date: Mon, 18 Dec 2017 09:09:05 -0700 Subject: [PATCH] Restore settings for thread timming. Dark and light pin theme --- build.gradle | 4 +-- res/drawable-mdpi/ic_forsta_pin_dark.png | Bin 477 -> 485 bytes res/layout/alert_view.xml | 2 +- res/values/attrs.xml | 1 + res/values/themes.xml | 2 ++ res/xml/preferences_chats.xml | 32 +++++++++--------- .../securesms/ConversationListActivity.java | 5 --- .../preferences/ChatsPreferenceFragment.java | 10 +++--- 8 files changed, 26 insertions(+), 30 deletions(-) diff --git a/build.gradle b/build.gradle index 59fc241b4..3230ef1b4 100644 --- a/build.gradle +++ b/build.gradle @@ -156,8 +156,8 @@ android { applicationId 'io.forsta.relay' minSdkVersion 14 targetSdkVersion 22 - versionName "0.1.79" - versionCode 179 + versionName "0.1.80" + versionCode 180 multiDexEnabled true buildConfigField "long", "BUILD_TIMESTAMP", getLastCommitTimestamp() + "L" resValue "string", "forsta_authorities", applicationId + '.provider.ccsm' diff --git a/res/drawable-mdpi/ic_forsta_pin_dark.png b/res/drawable-mdpi/ic_forsta_pin_dark.png index 02fb4103491a1a464476161033d769f62a14091b..3b85892cecf8555eb653436f3d21aeb99bb7d82b 100644 GIT binary patch delta 412 zcmV;N0b~B%1LXsdQ-2Z=1{`ovNGkvU0dh%1K~z}7?bf|ZTtO7Z;U^kDFp7d7g(LuoaI1B}$eya&IrgI{?eni2wh#UG35wA9+XQizo(RaZ4mxI7S( zIF8++9uWOFjV<~ry>uD<#V#iBqXfiFwC&XbC}08W7%c%Y5bZ@Z(qF(IOc#}7Edw!w zy;_(n0nr&dV7^x7#SljU(2*KouZ(#XVyj-i-wnMlJrx1e>r|ijbhb4B00000$@}!{9%3zFX+V-hOr%8 z)R7VSaj36*eBdrLsOLt=21D*f(UlTo7aj!E;N)PhN{Nj@QTM6&p)vm)-{B2 zoCcf6SnzBb1%Iri;dvYmagm^^Ga-kOP%t~KAg@=%dPr4&79B2$hyt#|*U=E-&VmQ5 zU;?`_@8?33$qY*<$3&vsOppKVG%R8ndo?1F57(zGJTKw~bCH_Zt@3^zCx1b%hKSRU yqCX*zins^@a%l@Vi6O5RaoDQg?>7Dyz5yI-j|g$v91SS|0000 diff --git a/res/values/attrs.xml b/res/values/attrs.xml index e6446c9a7..147d9c9b0 100644 --- a/res/values/attrs.xml +++ b/res/values/attrs.xml @@ -71,6 +71,7 @@ + diff --git a/res/values/themes.xml b/res/values/themes.xml index 7d9e3cbcf..01d24a4a6 100644 --- a/res/values/themes.xml +++ b/res/values/themes.xml @@ -158,6 +158,7 @@ @drawable/ic_info_outline_light @drawable/ic_warning_light + @drawable/ic_forsta_pin_dark @color/device_link_item_background_light @@ -241,6 +242,7 @@ @drawable/ic_info_outline_dark @drawable/ic_warning_dark + @drawable/ic_forsta_pin_light @color/device_link_item_background_dark diff --git a/res/xml/preferences_chats.xml b/res/xml/preferences_chats.xml index dc2b76eae..d7d9cae8c 100644 --- a/res/xml/preferences_chats.xml +++ b/res/xml/preferences_chats.xml @@ -27,22 +27,22 @@ android:entryValues="@array/pref_media_download_entries" /> - - - - - - + + - - - - - + - - - - - + + diff --git a/src/io/forsta/securesms/ConversationListActivity.java b/src/io/forsta/securesms/ConversationListActivity.java index a13ece5c1..d6d10a711 100644 --- a/src/io/forsta/securesms/ConversationListActivity.java +++ b/src/io/forsta/securesms/ConversationListActivity.java @@ -108,11 +108,6 @@ protected void onCreate(Bundle savedState, @NonNull MasterSecret masterSecret) { RefreshUserOrg task = new RefreshUserOrg(); task.execute(); - // Force set enable thread trimming to 30 days. - if (!TextSecurePreferences.isThreadLengthTrimmingEnabled(getApplicationContext())) { - TextSecurePreferences.setThreadTrimEnabled(getApplicationContext(), true); - } - if (ForstaPreferences.getForstaContactSync(this) == -1) { syncIndicator.setVisibility(View.VISIBLE); Account account = ForstaSyncAdapter.getAccount(getApplicationContext()); diff --git a/src/io/forsta/securesms/preferences/ChatsPreferenceFragment.java b/src/io/forsta/securesms/preferences/ChatsPreferenceFragment.java index 72489ff32..0d08113ef 100644 --- a/src/io/forsta/securesms/preferences/ChatsPreferenceFragment.java +++ b/src/io/forsta/securesms/preferences/ChatsPreferenceFragment.java @@ -34,12 +34,10 @@ public void onCreate(Bundle paramBundle) { .setOnPreferenceChangeListener(new MediaDownloadChangeListener()); findPreference(TextSecurePreferences.MEDIA_DOWNLOAD_ROAMING_PREF) .setOnPreferenceChangeListener(new MediaDownloadChangeListener()); - -// findPreference(TextSecurePreferences.THREAD_TRIM_NOW) -// .setOnPreferenceClickListener(new TrimNowClickListener()); -// findPreference(TextSecurePreferences.THREAD_TRIM_LENGTH) -// .setOnPreferenceChangeListener(new TrimLengthValidationListener()); - + findPreference(TextSecurePreferences.THREAD_TRIM_NOW) + .setOnPreferenceClickListener(new TrimNowClickListener()); + findPreference(TextSecurePreferences.THREAD_TRIM_LENGTH) + .setOnPreferenceChangeListener(new TrimLengthValidationListener()); } @Override