mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-05-01 07:04:33 +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
|
//sync streaks
|
||||||
friend.streaks?.takeIf { it.length > 0 }?.let {
|
friend.streaks?.takeIf { it.length > 0 }?.also {
|
||||||
val streaks = getFriendStreaks(friend.userId)
|
val streaks = getFriendStreaks(friend.userId)
|
||||||
|
|
||||||
database.execSQL("INSERT OR REPLACE INTO streaks (id, notify, expirationTimestamp, length) VALUES (?, ?, ?, ?)", arrayOf(
|
database.execSQL("INSERT OR REPLACE INTO streaks (id, notify, expirationTimestamp, length) VALUES (?, ?, ?, ?)", arrayOf(
|
||||||
friend.userId,
|
friend.userId,
|
||||||
streaks?.notify ?: true,
|
streaks?.notify != false,
|
||||||
it.expirationTimestamp,
|
it.expirationTimestamp,
|
||||||
it.length
|
it.length
|
||||||
))
|
))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user