Refactor name of getConversationsForWidget to getConversationsSnapshot

This commit is contained in:
Moez Bhatti
2018-03-27 18:27:12 -04:00
parent 005d5b761c
commit d9a3e17886
3 changed files with 3 additions and 3 deletions
@@ -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)