mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-04-29 22:24:35 +02:00
fix(common): syncFriend
This commit is contained in:
parent
977d8b4327
commit
a035f0ec10
@ -63,12 +63,12 @@ fun AppDatabase.syncFriend(friend: MessagingFriendInfo) {
|
||||
)
|
||||
)
|
||||
//sync streaks
|
||||
friend.streaks?.takeIf { it.length > 0 }?.let {
|
||||
friend.streaks?.takeIf { it.length > 0 }?.also {
|
||||
val streaks = getFriendStreaks(friend.userId)
|
||||
|
||||
database.execSQL("INSERT OR REPLACE INTO streaks (id, notify, expirationTimestamp, length) VALUES (?, ?, ?, ?)", arrayOf(
|
||||
friend.userId,
|
||||
streaks?.notify ?: true,
|
||||
streaks?.notify != false,
|
||||
it.expirationTimestamp,
|
||||
it.length
|
||||
))
|
||||
|
Loading…
x
Reference in New Issue
Block a user