Compare commits

..

3 Commits

Author SHA1 Message Date
7e0e7e4c29 fix: device label reads Settings.Global.DEVICE_NAME (user-set name), falls back to Build.MODEL
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 08:51:39 -04:00
28d96bd3c1 merge: snackbar above keyboard 2026-05-19 08:51:39 -04:00
adc7fb54d9 fix: imePadding on SnackbarHost so toast appears above keyboard
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 08:51:30 -04:00
2 changed files with 6 additions and 2 deletions

View File

@@ -2,6 +2,7 @@ package me.hgsky.synq.data
import android.content.Context
import android.os.Build
import android.provider.Settings
import androidx.datastore.preferences.core.edit
import androidx.datastore.preferences.core.intPreferencesKey
import androidx.datastore.preferences.core.stringPreferencesKey
@@ -29,7 +30,10 @@ class SettingsRepository(private val context: Context) {
SynqSettings(
serverUrl = prefs[KEY_URL] ?: "http://jeeves.mother:8765",
token = prefs[KEY_TOKEN] ?: "",
deviceLabel = prefs[KEY_DEVICE] ?: Build.MODEL,
deviceLabel = prefs[KEY_DEVICE] ?: (
Settings.Global.getString(context.contentResolver, Settings.Global.DEVICE_NAME)
?.takeIf { it.isNotBlank() } ?: Build.MODEL
),
syncIntervalMinutes = prefs[KEY_INTERVAL] ?: 15,
)
}

View File

@@ -89,7 +89,7 @@ fun CaptureScreen(
}
Scaffold(
snackbarHost = { SnackbarHost(snackbarState) },
snackbarHost = { SnackbarHost(snackbarState, modifier = Modifier.imePadding()) },
topBar = {
TopAppBar(
title = { Text("synq") },