Skip to content

Commit 83f4911

Browse files
committed
fix: resolve release build compile errors
- Add missing messageTopic parameter to GetChatMessageCount, lost during the earlier rebase/squash - Import GlobalScope and launch properly in ArtistImageRepository, with the required DelicateCoroutinesApi opt-in
1 parent 22590cf commit 83f4911

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

app/src/main/java/com/theveloper/pixelplay/data/repository/ArtistImageRepository.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import kotlinx.coroutines.Dispatchers
1515
import kotlinx.coroutines.CancellationException
1616
import kotlinx.coroutines.async
1717
import kotlinx.coroutines.awaitAll
18+
import kotlinx.coroutines.GlobalScope
19+
import kotlinx.coroutines.launch
1820
import kotlinx.coroutines.sync.Mutex
1921
import kotlinx.coroutines.sync.withLock
2022
import kotlinx.coroutines.withContext
@@ -284,7 +286,8 @@ class ArtistImageRepository @Inject constructor(
284286
memoryCache.evictAll()
285287
failedFetches.clear()
286288
// Also clear persisted no-image sentinels so the next prefetch retries all artists.
287-
kotlinx.coroutines.GlobalScope.launch(Dispatchers.IO) {
289+
@OptIn(kotlinx.coroutines.DelicateCoroutinesApi::class)
290+
GlobalScope.launch(Dispatchers.IO) {
288291
try { musicDao.clearArtistNoImageSentinels() } catch (e: Exception) { /* best-effort */ }
289292
}
290293
}

app/src/main/java/com/theveloper/pixelplay/data/telegram/TelegramRepository.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ class TelegramRepository @Inject constructor(
389389
suspend fun getApproxAudioMessageCount(chatId: Long): Int {
390390
return try {
391391
val result = clientManager.sendRequest<TdApi.Count>(
392-
TdApi.GetChatMessageCount(chatId, TdApi.SearchMessagesFilterAudio(), false)
392+
TdApi.GetChatMessageCount(chatId, null, TdApi.SearchMessagesFilterAudio(), false)
393393
)
394394
extractApproxCount(result)
395395
} catch (e: Exception) {

0 commit comments

Comments
 (0)