forked from upstream-mirrors/quik
Refactor name of getConversationsForWidget to getConversationsSnapshot
This commit is contained in:
@@ -74,7 +74,7 @@ class MessageRepositoryImpl @Inject constructor(
|
||||
.findAllAsync()
|
||||
}
|
||||
|
||||
override fun getConversationsForWidget(): List<Message> {
|
||||
override fun getConversationsSnapshot(): List<Message> {
|
||||
val realm = Realm.getDefaultInstance()
|
||||
return realm.copyFromRealm(realm.where(Message::class.java)
|
||||
.distinctValues("threadId")
|
||||
|
||||
@@ -30,7 +30,7 @@ interface MessageRepository {
|
||||
|
||||
fun getConversations(archived: Boolean = false): RealmResults<Message>
|
||||
|
||||
fun getConversationsForWidget(): List<Message>
|
||||
fun getConversationsSnapshot(): List<Message>
|
||||
|
||||
fun getBlockedConversations(): Flowable<List<Conversation>>
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ class WidgetAdapter(intent: Intent) : RemoteViewsService.RemoteViewsFactory {
|
||||
}
|
||||
|
||||
override fun onDataSetChanged() {
|
||||
conversations = messageRepo.getConversationsForWidget()
|
||||
conversations = messageRepo.getConversationsSnapshot()
|
||||
|
||||
val remoteViews = RemoteViews(context.packageName, R.layout.widget)
|
||||
appWidgetManager.partiallyUpdateAppWidget(appWidgetId, remoteViews)
|
||||
|
||||
Reference in New Issue
Block a user