Cleanup code
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
@@ -75,7 +75,7 @@ class HceService : HostApduService() {
|
||||
}
|
||||
}
|
||||
}
|
||||
return Service.START_NOT_STICKY
|
||||
return START_NOT_STICKY
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user