Fixed bugg where message was still marked as unread after returning from detail screen

+ bumped kotlin to version 1.1.60
This commit is contained in:
Christian Basler 2017-11-21 20:12:31 +01:00
parent c7dbe660b9
commit 49d87c3c75
4 changed files with 7 additions and 5 deletions

View File

@ -39,6 +39,9 @@ android {
signingConfig signingConfigs.release signingConfig signingConfigs.release
} }
} }
packagingOptions {
exclude 'META-INF/core.kotlin_module'
}
testOptions { testOptions {
unitTests { unitTests {
includeAndroidResources = true includeAndroidResources = true

View File

@ -19,8 +19,7 @@
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:label="@string/app_name" android:label="@string/app_name"
android:theme="@style/AppTheme" android:theme="@style/AppTheme"
android:name="android.support.multidex.MultiDexApplication" android:name="android.support.multidex.MultiDexApplication">
tools:replace="android:allowBackup">
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:label="@string/app_name"> android:label="@string/app_name">

View File

@ -106,9 +106,9 @@ class MessageDetailFragment : Fragment() {
text.linksClickable = true text.linksClickable = true
text.setTextIsSelectable(true) text.setTextIsSelectable(true)
val removed = item.labels.removeAll { it.type == Label.Type.UNREAD }
val messageRepo = Singleton.getMessageRepository(ctx) val messageRepo = Singleton.getMessageRepository(ctx)
if (removed) { if (item.isUnread()) {
Singleton.labeler.markAsRead(item)
(activity as? MainActivity)?.updateUnread() (activity as? MainActivity)?.updateUnread()
messageRepo.save(item) messageRepo.save(item)
} }

View File

@ -1,5 +1,5 @@
buildscript { buildscript {
ext.kotlin_version = '1.1.51' ext.kotlin_version = '1.1.60'
ext.anko_version = '0.10.2' ext.anko_version = '0.10.2'
repositories { repositories {
jcenter() jcenter()