Skip to content

Commit

Permalink
Fix job inject
Browse files Browse the repository at this point in the history
  • Loading branch information
SeniorZhai committed Dec 3, 2024
1 parent 29544ec commit 0f5eb0c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/one/mixin/android/job/BaseJob.kt
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ abstract class BaseJob(params: Params) : Job(params) {

fun topAssetDao(): TopAssetDao = database().topAssetDao()

fun jobDao(): JobDao = database().jobDao()
fun jobDao(): JobDao = pendingDatabase().jobDao()

fun favoriteAppDao(): FavoriteAppDao = database().favoriteAppDao()

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/one/mixin/android/job/Injector.kt
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ open class Injector {
fun messageHistoryDao(): MessageHistoryDao = databaseProvider.getMixinDatabase().messageHistoryDao()
fun userDao(): UserDao = databaseProvider.getMixinDatabase().userDao()
fun appDao(): AppDao = databaseProvider.getMixinDatabase().appDao()
fun jobDao(): JobDao = databaseProvider.getMixinDatabase().jobDao()
fun jobDao(): JobDao = databaseProvider.getPendingDatabase().jobDao()
fun conversationDao(): ConversationDao = databaseProvider.getMixinDatabase().conversationDao()
fun conversationExtDao(): ConversationExtDao = databaseProvider.getMixinDatabase().conversationExtDao()
fun participantDao(): ParticipantDao = databaseProvider.getMixinDatabase().participantDao()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ class ChatWebSocket(
val jsonData = gson.toJson(data)
if (jsonData.isNullOrBlank()) {
reportException(IllegalArgumentException("Error flood data: ${blazeMessage.id} ${blazeMessage.action}"))
databaseProvider.getMixinDatabase().jobDao().insertNoReplace(createAckJob(ACKNOWLEDGE_MESSAGE_RECEIPTS, BlazeAckMessage(data.messageId, MessageStatus.DELIVERED.name)))
databaseProvider.getPendingDatabase().jobDao().insertNoReplace(createAckJob(ACKNOWLEDGE_MESSAGE_RECEIPTS, BlazeAckMessage(data.messageId, MessageStatus.DELIVERED.name)))
return@launch
}
databaseProvider.getPendingDatabase().insertFloodMessage(FloodMessage(data.messageId, jsonData, data.createdAt))
Expand Down

0 comments on commit 0f5eb0c

Please sign in to comment.