mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
dont use isSyncing
This commit is contained in:
parent
170442c912
commit
c0982899ce
1 changed files with 4 additions and 3 deletions
|
@ -141,17 +141,18 @@ class SettingsFragment : Fragment() {
|
|||
/** used to debug leaks
|
||||
showToast(activity,"${VideoDownloadManager.downloadStatusEvent.size} :
|
||||
${VideoDownloadManager.downloadProgressEvent.size}") **/
|
||||
|
||||
// Check login status for each OAuth2API
|
||||
val isSyncing = accountManagers.any{ it.loginInfo() != null }
|
||||
val accountPFP = accountManagers.firstOrNull{ it.loginInfo() != null }
|
||||
val accountProfile = accountManagers.firstOrNull { it.loginInfo() != null }
|
||||
|
||||
// show local account image and pfp when not syncing with any api.
|
||||
if (!isSyncing && accountPFP == null) {
|
||||
if (accountProfile == null) {
|
||||
val activity = activity ?: return
|
||||
val currentAccount = try {
|
||||
DataStoreHelper.accounts.firstOrNull {
|
||||
it.keyIndex == DataStoreHelper.selectedKeyIndex
|
||||
} ?: activity.let { DataStoreHelper.getDefaultAccount(activity) }
|
||||
|
||||
} catch (e: IllegalStateException) {
|
||||
Log.e("AccountManager", "Activity not found", e)
|
||||
null
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue