File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
src/main/kotlin/com/theapache64/stackzy/ui/feature/selectapp Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ package com.theapache64.stackzy.ui.feature.selectapp
3
3
import com.github.theapache64.gpa.api.Play
4
4
import com.github.theapache64.gpa.model.Account
5
5
import com.theapache64.stackzy.data.local.AndroidApp
6
- import com.theapache64.stackzy.data.local.AndroidDevice
7
6
import com.theapache64.stackzy.data.repo.AdbRepo
8
7
import com.theapache64.stackzy.data.repo.PlayStoreRepo
9
8
import com.theapache64.stackzy.data.util.calladapter.flow.Resource
@@ -153,16 +152,12 @@ class SelectAppViewModel @Inject constructor(
153
152
}
154
153
155
154
fun onOpenMarketClicked () {
156
- when (apkSource) {
157
- is ApkSource .Adb -> {
158
- viewModelScope.launch {
159
- val androidDevice = (apkSource as ApkSource .Adb <AndroidDevice >).value
160
- adbRepo.launchMarket(androidDevice, searchKeyword.value)
161
- }
155
+ if (apkSource is ApkSource .Adb ) {
156
+ viewModelScope.launch {
157
+ val androidDevice = (apkSource as ApkSource .Adb <AndroidDeviceWrapper >).value.androidDevice
158
+ adbRepo.launchMarket(androidDevice, searchKeyword.value)
162
159
}
163
- is ApkSource .PlayStore -> TODO ()
164
160
}
165
-
166
161
}
167
162
168
163
/* *
You canβt perform that action at this time.
0 commit comments