@@ -229,12 +229,16 @@ private fun GoogleButton(viewModel: AppStartViewModel?) {
229229 val activity = LocalContext .current as ? AppStartActivity
230230 Button (
231231 onClick = {
232- if (signInIntent == null ){
233- Toast .makeText(activity, " Google Signin not available." , Toast .LENGTH_SHORT ).show()
234- return @Button
232+ if (com.windscribe.mobile.BuildConfig .FLAVOR == " google" ) {
233+ if (signInIntent == null ){
234+ Toast .makeText(activity, " Google Signin not available." , Toast .LENGTH_SHORT ).show()
235+ return @Button
236+ }
237+ viewModel.onSignIntentLaunch()
238+ launcher.launch(signInIntent)
239+ } else {
240+ Toast .makeText(activity, " Google Sign-in not available in F-Droid version" , Toast .LENGTH_SHORT ).show()
235241 }
236- viewModel.onSignIntentLaunch()
237- launcher.launch(signInIntent)
238242 },
239243 Modifier
240244 .height(48 .dp)
@@ -298,12 +302,17 @@ private fun LoginButton() {
298302@Composable
299303fun EmergencyConnectButton (isConnected : Boolean ) {
300304 val navController = LocalNavController .current
305+ val context = LocalContext .current
301306 Text (
302307 text = if (isConnected) " Emergency Connect On" else " Can’t Connect?" ,
303308 style = font18.copy(fontWeight = FontWeight .Medium ),
304309 color = if (isConnected) Color (0xFF61FF8A ) else Color (0xFF838D9B ),
305310 modifier = Modifier .clickable {
306- navController.navigate(Screen .EmergencyConnect .route)
311+ if (com.windscribe.mobile.BuildConfig .FLAVOR == " google" ) {
312+ navController.navigate(Screen .EmergencyConnect .route)
313+ } else {
314+ Toast .makeText(context, " Emergency Connect not available in F-Droid version" , Toast .LENGTH_SHORT ).show()
315+ }
307316 }
308317 )
309318}
0 commit comments