fix: smart list
Sometimes smart list data was not updated. This patch fix it by
changing subscriptions.
Change-Id: Icad42975e0b74b683396adced60cbe50863459a4
diff --git a/Ring/Ring/Features/Conversations/SmartList/SmartlistViewModel.swift b/Ring/Ring/Features/Conversations/SmartList/SmartlistViewModel.swift
index fff1467..1173deb 100644
--- a/Ring/Ring/Features/Conversations/SmartList/SmartlistViewModel.swift
+++ b/Ring/Ring/Features/Conversations/SmartList/SmartlistViewModel.swift
@@ -107,10 +107,9 @@
DispatchQueue.main.asyncAfter(deadline: .now() + 0.01, execute: {
if let account = self.accountsService.currentAccount {
self.profileService.getAccountProfile(accountId: account.id)
- .take(1)
.subscribe(onNext: { profile in
self.profileImageForCurrentAccount.onNext(profile)
- }).disposed(by: self.disposeBag)
+ }).disposed(by: self.tempBag)
}
})
return profileImageForCurrentAccount.share()
@@ -134,10 +133,9 @@
DispatchQueue.main.asyncAfter(deadline: .now() + 0.01, execute: {
self.conversationsService.conversationsForCurrentAccount
.observeOn(MainScheduler.instance)
- .take(1)
.subscribe(onNext: { (conversations) in
self.conversationsForCurrentAccount.onNext(conversations)
- }).disposed(by: self.disposeBag)
+ }).disposed(by: self.tempBag)
})
return self.conversationsForCurrentAccount.share().map({ (conversations) in