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:
parent
c7dbe660b9
commit
49d87c3c75
@ -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
|
||||||
|
@ -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">
|
||||||
|
@ -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)
|
||||||
}
|
}
|
||||||
|
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user