Cleanup code

This commit is contained in:
Kgothatso Ngako
2026-06-20 14:59:46 +02:00
parent 6c2609254d
commit 9def2cbe33
115 changed files with 371 additions and 416 deletions

View File

@@ -46,9 +46,9 @@ class MainActivity : ComponentActivity() {
}
fun stopNfcReader() {
if (_root_ide_package_.com.machankura.compose.ui.composable.widgets.nfc.NfcStateRepository.isReading()) {
_root_ide_package_.com.machankura.compose.ui.composable.widgets.nfc.NfcStateRepository.updateState(
_root_ide_package_.com.machankura.compose.ui.composable.widgets.nfc.NfcState.Inactive)
if (com.machankura.compose.ui.composable.widgets.nfc.NfcStateRepository.isReading()) {
com.machankura.compose.ui.composable.widgets.nfc.NfcStateRepository.updateState(
com.machankura.compose.ui.composable.widgets.nfc.NfcState.Inactive)
}
nfcAdapter?.disableReaderMode(this@MainActivity)
}

View File

@@ -6,4 +6,4 @@ class AndroidPlatform : Platform {
override val name: String = "Android ${Build.VERSION.SDK_INT}"
}
actual fun getPlatform(): Platform = _root_ide_package_.at.torch.compose.AndroidPlatform()
actual fun getPlatform(): Platform = AndroidPlatform()

View File

@@ -75,7 +75,7 @@ class HceService : HostApduService() {
}
}
}
return Service.START_NOT_STICKY
return START_NOT_STICKY
}
@OptIn(ExperimentalStdlibApi::class)

View File

@@ -135,7 +135,7 @@ class PaymentsForegroundService : Service() {
}
// show a notification -- this is mandatory!
val notif = SystemNotificationHelper.notifyRunningHeadless(applicationContext)
SystemNotificationHelper.notifyRunningHeadless(applicationContext)
// startForeground(notif)
// service will automatically shutdown -- delay is short if the message is ignored

View File

@@ -149,7 +149,7 @@ object SystemNotificationHelper {
// amountIncoming.toPrettyString(BitcoinUnit.Sat, withUnit = true)),
message = when {
source == LiquidityEvents.Source.OnChainWallet && nextTimeoutRemainingBlocks != null && nextTimeoutRemainingBlocks < SWAP_TIMEOUT_THRESHOLD_IN_BLOCKS -> {
val remainingTimeMillis = nextTimeoutRemainingBlocks * 10 * DateUtils.MINUTE_IN_MILLIS
nextTimeoutRemainingBlocks * 10 * DateUtils.MINUTE_IN_MILLIS
// TODO: context.getString(R.string.notif_rejected_policy_disabled_timeout, (currentTimestampMillis() + remainingTimeMillis).toAbsoluteDateString())
"Rejected policy disabled timeout"
}