mirror of
https://github.com/twofas/2fas-android.git
synced 2024-11-22 02:09:58 +01:00
Fix browser registration
This commit is contained in:
parent
2b46c10fbf
commit
2d50c40d46
@ -179,7 +179,7 @@ private fun ContentScreen(
|
||||
shape = ButtonShape(),
|
||||
modifier = Modifier.padding(start = 72.dp, top = 6.dp, bottom = 2.dp)
|
||||
) {
|
||||
Text(text = "Enable Notifications".uppercase(), color = ButtonTextColor())
|
||||
Text(text = "Enable Notifications", color = ButtonTextColor())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ fun BrowserExtensionPermissionScreen() {
|
||||
start.linkTo(parent.start)
|
||||
end.linkTo(parent.end)
|
||||
}) {
|
||||
Text(text = stringResource(id = R.string.commons__continue).uppercase(), color = ButtonTextColor())
|
||||
Text(text = stringResource(id = R.string.commons__continue), color = ButtonTextColor())
|
||||
}
|
||||
|
||||
if (askForPermission) {
|
||||
|
@ -13,8 +13,10 @@ import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Scaffold
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.collectAsState
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.rememberCoroutineScope
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.painterResource
|
||||
@ -33,6 +35,7 @@ import com.twofasapp.design.compose.ButtonShape
|
||||
import com.twofasapp.design.compose.ButtonTextColor
|
||||
import com.twofasapp.designsystem.common.TwTopAppBar
|
||||
import com.twofasapp.resources.R
|
||||
import kotlinx.coroutines.launch
|
||||
import org.koin.androidx.compose.get
|
||||
import org.koin.androidx.compose.koinViewModel
|
||||
|
||||
@ -45,8 +48,14 @@ fun PairingProgressScreen(
|
||||
viewModel: PairingProgressViewModel = koinViewModel(),
|
||||
notificationManager: NotificationManager = get()
|
||||
) {
|
||||
val scope = rememberCoroutineScope()
|
||||
val uiState = viewModel.uiState.collectAsState()
|
||||
viewModel.pairBrowser(extensionId)
|
||||
|
||||
LaunchedEffect(Unit) {
|
||||
scope.launch {
|
||||
viewModel.pairBrowser(extensionId)
|
||||
}
|
||||
}
|
||||
|
||||
Scaffold(
|
||||
topBar = {
|
||||
|
@ -65,7 +65,7 @@ internal class BrowserExtLocalSource(
|
||||
|
||||
suspend fun saveMobileDevice(mobileDevice: MobileDevice) {
|
||||
preferences.putString(KeyMobileDevice, json.encodeToString(mobileDevice.asEntity()))
|
||||
mobileDeviceFlow.tryEmit(mobileDevice)
|
||||
mobileDeviceFlow.emit(mobileDevice)
|
||||
}
|
||||
|
||||
suspend fun savePairedBrowser(pairedBrowser: PairedBrowser) {
|
||||
|
@ -17,4 +17,4 @@ internal fun MobileDeviceEntity.asDomain() = MobileDevice(
|
||||
fcmToken = fcmToken,
|
||||
platform = platform,
|
||||
publicKey = publicKey,
|
||||
)
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user