forked from upstream-mirrors/quik
Upgrade to Realm 4.1.1
This commit is contained in:
+1
-4
@@ -9,10 +9,7 @@ buildscript {
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.0.0'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath "io.realm:realm-gradle-plugin:3.7.0"
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
classpath "io.realm:realm-gradle-plugin:4.1.1"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -53,7 +53,7 @@ dependencies {
|
||||
kapt "android.arch.lifecycle:compiler:1.0.0-alpha9-1"
|
||||
kapt 'com.github.bumptech.glide:compiler:4.3.0'
|
||||
kapt "com.google.dagger:dagger-compiler:2.11"
|
||||
kapt 'io.realm:realm-annotations:3.7.0'
|
||||
kapt 'io.realm:realm-annotations-processor:3.7.0'
|
||||
kapt 'io.realm:realm-annotations:4.1.1'
|
||||
kapt 'io.realm:realm-annotations-processor:4.1.1'
|
||||
provided 'javax.annotation:jsr250-api:1.0'
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ class NotificationManager @Inject constructor(
|
||||
.setStyle(style)
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 24 && conversation != null) {
|
||||
notification.addAction(getReplyAction(conversation.contacts[0].address, conversation.id))
|
||||
notification.addAction(getReplyAction(conversation.contacts[0]?.address.orEmpty(), conversation.id))
|
||||
}
|
||||
|
||||
notificationManager.notify(threadId.toInt(), notification.build())
|
||||
|
||||
@@ -29,6 +29,7 @@ class MessageRepository @Inject constructor(
|
||||
return Realm.getDefaultInstance()
|
||||
.where(Message::class.java)
|
||||
.findAllSortedAsync("date", Sort.DESCENDING)
|
||||
.where()
|
||||
.distinctAsync("threadId")
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ class MessagesViewModel(val threadId: Long) : QkViewModel<MessagesView, Messages
|
||||
|
||||
intents += view.sendIntent.subscribe {
|
||||
val previousState = state.value!!
|
||||
sendMessage.execute(SendMessage.Params(threadId, conversation.contacts[0].address, previousState.draft))
|
||||
sendMessage.execute(SendMessage.Params(threadId, conversation.contacts[0]?.address.orEmpty(), previousState.draft))
|
||||
newState { it.copy(draft = "", canSend = false) }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user