-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: upload dialog, move log to AdvancedPage
- Loading branch information
Showing
7 changed files
with
249 additions
and
341 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
package li.songe.gkd.ui | ||
|
||
import androidx.lifecycle.SavedStateHandle | ||
import androidx.lifecycle.ViewModel | ||
import androidx.lifecycle.viewModelScope | ||
import dagger.hilt.android.lifecycle.HiltViewModel | ||
import kotlinx.coroutines.flow.MutableStateFlow | ||
import kotlinx.coroutines.flow.SharingStarted | ||
import kotlinx.coroutines.flow.stateIn | ||
import li.songe.gkd.db.DbSet | ||
import li.songe.gkd.ui.component.UploadOptions | ||
import javax.inject.Inject | ||
|
||
@HiltViewModel | ||
class AdvancedVm @Inject constructor(stateHandle: SavedStateHandle) : ViewModel() { | ||
class AdvancedVm @Inject constructor() : ViewModel() { | ||
val snapshotCountFlow = | ||
DbSet.snapshotDao.count().stateIn(viewModelScope, SharingStarted.Eagerly, 0) | ||
|
||
val shizukuErrorFlow = MutableStateFlow(false) | ||
|
||
val uploadOptions = UploadOptions(viewModelScope) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.