added the network check
This commit is contained in:
@@ -1,18 +1,14 @@
|
|||||||
package `in`.sminnovations.attendanceapp.screens.home.ui.componets
|
package `in`.sminnovations.attendanceapp.screens.home.ui.componets
|
||||||
|
|
||||||
import android.content.Context
|
import androidx.compose.foundation.layout.padding
|
||||||
import android.net.ConnectivityManager
|
import androidx.compose.material3.AlertDialog
|
||||||
import android.net.Network
|
import androidx.compose.material3.Button
|
||||||
import androidx.lifecycle.LiveData
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.material3.*
|
|
||||||
import androidx.compose.runtime.*
|
|
||||||
import androidx.compose.ui.Alignment
|
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun NetworkErrorDialog(
|
fun NetworkErrorDialog(
|
||||||
showDialog: Boolean,
|
showDialog: Boolean,
|
||||||
@@ -25,7 +21,7 @@ fun NetworkErrorDialog(
|
|||||||
Text(text = "Network Error")
|
Text(text = "Network Error")
|
||||||
},
|
},
|
||||||
text = {
|
text = {
|
||||||
Text(text = "Network is not connected. Please check your Wi-Fi or mobile data.")
|
Text(text = "Network is not connected. Please check your Wi-Fi or mobile data.\n\nIf Wi-Fi is just connected wait for some time and press retry again")
|
||||||
},
|
},
|
||||||
confirmButton = {
|
confirmButton = {
|
||||||
Button(
|
Button(
|
||||||
|
|||||||
Reference in New Issue
Block a user