released date added

This commit is contained in:
moon 2026-07-21 23:27:19 +06:30
parent 188158a494
commit 706a48d1d1

View File

@ -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)
)
}
}
) {