mirror of
https://github.com/tateisu/SubwayTooter
synced 2025-01-31 11:04:56 +01:00
OpenStickerロード中の表示を追加
This commit is contained in:
parent
12f129a878
commit
04ca3d017a
@ -31,23 +31,25 @@ class ColumnTask_Loading(
|
||||
|
||||
internal var listPinned: ArrayList<TimelineItem>? = null
|
||||
|
||||
private fun fireProgress(s:String){
|
||||
runOnMainLooper {
|
||||
if (isCancelled) return@runOnMainLooper
|
||||
column.taskProgress = s
|
||||
column.fireShowContent(reason = "loading progress", changeList = ArrayList())
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun background(): TootApiResult? {
|
||||
ctStarted.set(true)
|
||||
|
||||
if (PrefB.bpOpenSticker.value) {
|
||||
fireProgress("loading openSticker")
|
||||
OpenSticker.loadAndWait()
|
||||
}
|
||||
|
||||
val client = TootApiClient(context, callback = object : TootApiCallback {
|
||||
override suspend fun isApiCancelled() = isCancelled || column.isDispose.get()
|
||||
|
||||
override suspend fun publishApiProgress(s: String) {
|
||||
runOnMainLooper {
|
||||
if (isCancelled) return@runOnMainLooper
|
||||
column.taskProgress = s
|
||||
column.fireShowContent(reason = "loading progress", changeList = ArrayList())
|
||||
}
|
||||
}
|
||||
override suspend fun publishApiProgress(s: String) = fireProgress(s)
|
||||
})
|
||||
|
||||
client.account = accessInfo
|
||||
|
Loading…
x
Reference in New Issue
Block a user