This idea of caching the user was causing issues.
This commit is contained in:
@@ -61,8 +61,6 @@ class Account(
|
|||||||
var latestContactList: ContactListEvent? = null
|
var latestContactList: ContactListEvent? = null
|
||||||
) {
|
) {
|
||||||
var transientHiddenUsers: Set<String> = setOf()
|
var transientHiddenUsers: Set<String> = setOf()
|
||||||
@Transient
|
|
||||||
var userProfile: User? = null
|
|
||||||
|
|
||||||
// Observers line up here.
|
// Observers line up here.
|
||||||
val live: AccountLiveData = AccountLiveData(this)
|
val live: AccountLiveData = AccountLiveData(this)
|
||||||
@@ -70,12 +68,7 @@ class Account(
|
|||||||
val saveable: AccountLiveData = AccountLiveData(this)
|
val saveable: AccountLiveData = AccountLiveData(this)
|
||||||
|
|
||||||
fun userProfile(): User {
|
fun userProfile(): User {
|
||||||
userProfile?.let { return it }
|
return LocalCache.getOrCreateUser(loggedIn.pubKey.toHexKey())
|
||||||
|
|
||||||
val newUser = LocalCache.getOrCreateUser(loggedIn.pubKey.toHexKey())
|
|
||||||
userProfile = newUser
|
|
||||||
|
|
||||||
return newUser
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun followingChannels(): List<Channel> {
|
fun followingChannels(): List<Channel> {
|
||||||
|
|||||||
Reference in New Issue
Block a user