mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-06 03:38:23 +00:00
Merge pull request #3930 from vitorpamplona/claude/disable-high-usage-warning-asef8l
feat: disable the automatic high resource usage prompt
This commit is contained in:
+13
@@ -44,6 +44,15 @@ import com.vitorpamplona.quartz.utils.TimeUtils
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.withContext
|
||||
|
||||
/**
|
||||
* Master switch for the automatic high-usage prompt. Turned off: the app never
|
||||
* interrupts the user with it, no matter what the ledger records. Everything
|
||||
* else stays in place — the ledger keeps counting, and Settings > App resource
|
||||
* usage still shows the numbers and offers the same review-and-send report — so
|
||||
* flipping this back to true is all it takes to bring the prompt back.
|
||||
*/
|
||||
private const val HIGH_USAGE_ALERT_ENABLED = false
|
||||
|
||||
/**
|
||||
* On app open, checks the resource-usage ledger against the
|
||||
* [ResourceUsageAlerts] thresholds and — at most once per week, unless the
|
||||
@@ -51,12 +60,16 @@ import kotlinx.coroutines.withContext
|
||||
* to the developers. Confirming only PREFILLS the NIP-17 DM composer (crash
|
||||
* report pattern): the full report text is visible there and nothing is sent
|
||||
* until the user taps Send.
|
||||
*
|
||||
* Currently disabled by [HIGH_USAGE_ALERT_ENABLED].
|
||||
*/
|
||||
@Composable
|
||||
fun DisplayResourceUsageAlert(
|
||||
accountViewModel: AccountViewModel,
|
||||
nav: INav,
|
||||
) {
|
||||
if (!HIGH_USAGE_ALERT_ENABLED) return
|
||||
|
||||
val context = LocalContext.current
|
||||
val alert = remember { mutableStateOf<ResourceUsageAlerts.Alert?>(null) }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user