mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-07-25 20:23:09 +02:00
BugFix for alternating follow/unfollow when following multiple people in a row
This commit is contained in:
@@ -208,7 +208,10 @@ object LocalCache {
|
|||||||
fun consume(event: ContactListEvent) {
|
fun consume(event: ContactListEvent) {
|
||||||
val user = getOrCreateUser(event.pubKey.toHexKey())
|
val user = getOrCreateUser(event.pubKey.toHexKey())
|
||||||
|
|
||||||
if (event.createdAt > user.updatedFollowsAt) {
|
if (event.createdAt > user.updatedFollowsAt && event.follows.size > 0) {
|
||||||
|
// Saves relay list only if it's a user that is currently been seen
|
||||||
|
user.latestContactList = event
|
||||||
|
|
||||||
user.updateFollows(
|
user.updateFollows(
|
||||||
event.follows.map {
|
event.follows.map {
|
||||||
try {
|
try {
|
||||||
@@ -239,9 +242,6 @@ object LocalCache {
|
|||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
e.printStackTrace()
|
e.printStackTrace()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Saves relay list only if it's a user that is currently been seen
|
|
||||||
user.latestContactList = event
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.d(
|
Log.d(
|
||||||
|
Reference in New Issue
Block a user