From 706a48d1d160787bb0161fd195412c8425b417fa Mon Sep 17 00:00:00 2001 From: moon <56061215+MgKyawLay@users.noreply.github.com> Date: Tue, 21 Jul 2026 23:27:19 +0630 Subject: [PATCH] released date added --- .../ui/dashboard/DashboardScreen.kt | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/mob/utsmyanmar/ui/dashboard/DashboardScreen.kt b/app/src/main/java/com/mob/utsmyanmar/ui/dashboard/DashboardScreen.kt index a25c389..1bfc16c 100644 --- a/app/src/main/java/com/mob/utsmyanmar/ui/dashboard/DashboardScreen.kt +++ b/app/src/main/java/com/mob/utsmyanmar/ui/dashboard/DashboardScreen.kt @@ -51,6 +51,7 @@ import androidx.compose.ui.res.painterResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.compose.ui.window.Dialog +import com.mob.utsmyanmar.BuildConfig import com.mob.utsmyanmar.R import com.mob.utsmyanmar.ui.components.appbar.AppBar import com.mob.utsmyanmar.ui.device_info.DeviceInfoUiState @@ -80,7 +81,7 @@ fun DashboardScreen2( ) { val drawerState = rememberDrawerState(initialValue = DrawerValue.Closed) val scope = rememberCoroutineScope() - val mainHandler = remember { Handler(Looper.getMainLooper())} + val mainHandler = remember { Handler(Looper.getMainLooper()) } var showHostActionDialog by remember { mutableStateOf(false) } var activeHostAction by remember { mutableStateOf("Log-On") } var isHostActionRunning by remember { mutableStateOf(false) } @@ -97,6 +98,7 @@ fun DashboardScreen2( fun successMessage(action: String) = "$action success." fun failureMessage(action: String, resultCode: Int?) = "$action failed. Response code: ${resultCode ?: -1}" + fun networkFailureMessage(action: String) = "Network error during $action." fun openHostActionDialog(action: String) { activeHostAction = action @@ -141,12 +143,14 @@ fun DashboardScreen2( dialogMessage = successMessage(activeHostAction) } } + override fun onFailureSignOn(resultCode: Int?) { mainHandler.post { isHostActionRunning = false dialogMessage = failureMessage(activeHostAction, resultCode) } } + override fun onNetworkFailSignOn(message: String?) { mainHandler.post { isHostActionRunning = false @@ -253,6 +257,21 @@ fun DashboardScreen2( } } } + Spacer(modifier = Modifier.height(10.dp)) + Text( + text = "App Version : ${BuildConfig.VERSION_NAME}", + style = MaterialTheme.typography.bodySmall, + color = Color.Gray, + modifier = Modifier.padding(horizontal = 16.dp) + ) + Spacer(modifier = Modifier.height(10.dp)) + Text( + text = "Released on : 21-Jul-26", + style = MaterialTheme.typography.bodySmall, + color = Color.Gray, + modifier = Modifier.padding(horizontal = 16.dp) + + ) Spacer(modifier = Modifier.height(10.dp)) Text( @@ -341,6 +360,16 @@ fun DashboardScreen2( }, trailingIcon = {}, ) + + Spacer(modifier = Modifier.weight(1f)) + Text( + text = "v${BuildConfig.VERSION_NAME}", + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 16.dp, vertical = 8.dp), + style = MaterialTheme.typography.labelSmall, + color = Color.Black.copy(alpha = 0.5f) + ) } } ) {