mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-04-02 08:58:23 +02:00
This idea of caching the user was causing issues.
This commit is contained in:
parent
639e3a5087
commit
83f785c5c4
@ -61,8 +61,6 @@ class Account(
|
||||
var latestContactList: ContactListEvent? = null
|
||||
) {
|
||||
var transientHiddenUsers: Set<String> = setOf()
|
||||
@Transient
|
||||
var userProfile: User? = null
|
||||
|
||||
// Observers line up here.
|
||||
val live: AccountLiveData = AccountLiveData(this)
|
||||
@ -70,12 +68,7 @@ class Account(
|
||||
val saveable: AccountLiveData = AccountLiveData(this)
|
||||
|
||||
fun userProfile(): User {
|
||||
userProfile?.let { return it }
|
||||
|
||||
val newUser = LocalCache.getOrCreateUser(loggedIn.pubKey.toHexKey())
|
||||
userProfile = newUser
|
||||
|
||||
return newUser
|
||||
return LocalCache.getOrCreateUser(loggedIn.pubKey.toHexKey())
|
||||
}
|
||||
|
||||
fun followingChannels(): List<Channel> {
|
||||
|
Loading…
x
Reference in New Issue
Block a user