File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
app/src/main/java/com/paulcoding/hviewer/network Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -38,14 +38,15 @@ object Github {
38
38
suspend fun checkVersionOrUpdate () {
39
39
withContext(Dispatchers .IO ) {
40
40
try {
41
- _stateFlow .update { it.copy(isLoading = true ) }
42
41
if (_stateFlow .value.remoteUrl != Preferences .getRemote()) {
43
42
Preferences .setRemote(_stateFlow .value.remoteUrl)
43
+ _stateFlow .update { it.copy(isLoading = true ) }
44
44
downloadAndGetConfig()
45
45
return @withContext
46
46
}
47
47
if (! appContext.configFile.exists()) {
48
48
log(" Config file not exist, downloading from remote..." , " check update" )
49
+ _stateFlow .update { it.copy(isLoading = true ) }
49
50
downloadAndGetConfig()
50
51
return @withContext
51
52
}
@@ -55,6 +56,7 @@ object Github {
55
56
56
57
if (currentConfigs == null ) {
57
58
log(" Can not read config file, downloading from remote..." , " check update" )
59
+ _stateFlow .update { it.copy(isLoading = true ) }
58
60
downloadAndGetConfig()
59
61
} else {
60
62
val siteConfigs = getSiteConfigs()
You can’t perform that action at this time.
0 commit comments