release: v0.3.7.1 — UI polish, image-viewer fix, new flat icon
dev / Build debug APK (push) Successful in 1m52s
release / Build & attach release APK (push) Failing after 6m30s

Maintenance release.

UI polish:
- Editor top bar decluttered: camera / attach-file / add-tag moved out of
  the title bar into a Keep-style bottom action row, so the title and
  remaining buttons (favourite, save, overflow) always fit, even on
  narrow screens. Title is now "New note" / "Edit note" with ellipsis.
- Search auto-focuses when opened and shows a clear button while typing.
- Long tag lists in the navigation drawer now scroll within the sheet
  instead of overflowing the bottom (weight(1f) on the scroll column).
- Add-tag sheet opens with the keyboard already up.

Bug fix:
- Image viewer no longer flashes a false "couldn't decode" error on
  every persisted image open (the old LaunchedEffect checked the bitmap
  before the async load finished); genuine failures now show
  "Couldn't load image" in place of "Loading…".

New flat app icon:
- incido_flat_icon.png replaces the v0.3.3.8 artwork: adaptive
  foregrounds (108-432px) + legacy mipmaps (48-192px) regenerated;
  ic_launcher_background re-tinted #010435 -> #352999 to match.

Hygiene:
- Unused persistedBytes param dropped from AttachmentStrip; redundant
  repoForViewer alias and dead _ignored val removed; fully-qualified
  Spacer/Image/Column/Dispatchers references replaced with imports.

versionCode 31->32, versionName "0.3.7.0"->"0.3.7.1",
SettingsViewModel.APP_VERSION bumped in lockstep.
This commit is contained in:
Incido Developer committed 2026-08-30 10:19:49 +12:00
1 parent 4b41b0dedb
commit 37e9c14d1e
28 files changed
+181 -205

No files matched your search

@@ -25,6 +25,25 @@ object ReleaseNotes {
* Append a new entry on top each release.
*/
val RECENT: List<ReleaseNote> = listOf(
ReleaseNote(
version = "0.3.7.1",
date = "2026-08-30",
bullets = listOf(
"Cleaner Add / Edit screen: camera, attach-file, and " +
"add-tag moved out of the crowded title bar into a " +
"bottom action row — the title and remaining buttons " +
"now fit comfortably on every screen.",
"Fixed a false error message that flashed whenever you " +
"opened a saved image in the full-screen viewer.",
"Search now focuses automatically when opened and shows " +
"a clear (✕) button while you type.",
"Long tag lists in the navigation drawer now scroll " +
"instead of being cut off at the bottom.",
"The add-tag sheet opens with the keyboard already up.",
"New app icon: a flatter, cleaner take on the shield " +
"and pen-nib artwork.",
),
),
ReleaseNote(
version = "0.3.7.0",
date = "2026-08-20",
@@ -88,22 +107,6 @@ object ReleaseNotes {
"while Incido is open.",
),
),
ReleaseNote(
version = "0.3.4.0",
date = "2026-08-17",
bullets = listOf(
"Note cards now show a paperclip icon on the right edge " +
"whenever a note has an attachment — lined up between " +
"the favourite star and the \u22EE menu.",
"Cards with a dark image background are now readable in " +
"Light theme — the title, preview text, timestamp and " +
"icons switch to light colours over the photo.",
"Auto-Lock set to \"Immediately\" no longer locks the app " +
"while you're picking a file to attach (or exporting / " +
"importing a backup), so your in-progress note and the " +
"attachment survive the trip to the file manager.",
),
),
// v0.3.7.0 push drops v0.3.3.8 off the "5 most recent" tail.
// v0.3.7.1 push drops v0.3.4.0 off the "5 most recent" tail.
)
}
@@ -26,7 +26,6 @@ import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.lifecycle.compose.collectAsStateWithLifecycle
@@ -128,6 +127,10 @@ fun IncidoDrawer(
Column(
modifier = Modifier
.fillMaxWidth()
// weight(1f) caps this list at the remaining
// sheet height so long tag lists scroll inside
// the drawer instead of overflowing the bottom.
.weight(1f)
.verticalScroll(rememberScrollState()),
verticalArrangement = Arrangement.spacedBy(2.dp),
) {
@@ -165,6 +168,3 @@ private fun DrawerHashtagEntry(
icon = { Icon(Icons.Filled.Tag, contentDescription = null) },
)
}
@Suppress("unused")
private val _ignored: Color = Color.Unspecified
@@ -18,7 +18,6 @@ import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.produceState
@@ -31,13 +30,11 @@ import androidx.compose.ui.graphics.asImageBitmap
import androidx.compose.ui.graphics.graphicsLayer
import androidx.compose.ui.input.pointer.pointerInput
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.Dialog
import androidx.compose.ui.window.DialogProperties
import android.graphics.BitmapFactory
import android.widget.Toast
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import org.incido.domain.repository.NoteRepository
@@ -91,9 +88,11 @@ fun ImageViewerScreen(
offsetY += panChange.y
}
// Decode the image (or display an error / "unsupported"
// message for non-image attachments).
// Decode the image (or display an error message when the
// bytes can't be loaded / decoded).
var loadFailed by remember { mutableStateOf(false) }
val bitmap by produceState<android.graphics.Bitmap?>(initialValue = null, key1 = attachmentId) {
loadFailed = false
val bytes: ByteArray? = when (attachmentId) {
is ViewerAttachmentId.Persisted -> withContext(Dispatchers.IO) {
repository.getAttachmentBytes(attachmentId.id)
@@ -101,22 +100,14 @@ fun ImageViewerScreen(
is ViewerAttachmentId.Pending -> pendingBytes
}
if (bytes == null) {
value = null
loadFailed = true
return@produceState
}
value = withContext(Dispatchers.IO) {
val decoded = withContext(Dispatchers.IO) {
BitmapFactory.decodeByteArray(bytes, 0, bytes.size)
}
}
val ctx = LocalContext.current
LaunchedEffect(attachmentId) {
if (attachmentId is ViewerAttachmentId.Persisted) {
val mime = "image" // we only open the viewer for images; see editor
if (bitmap == null) {
Toast.makeText(ctx, "Couldn't decode $mime attachment", Toast.LENGTH_SHORT).show()
}
}
value = decoded
if (decoded == null) loadFailed = true
}
if (bitmap != null) {
@@ -152,7 +143,7 @@ fun ImageViewerScreen(
horizontalAlignment = Alignment.CenterHorizontally,
) {
Text(
text = "Loading…",
text = if (loadFailed) "Couldn't load image" else "Loading…",
color = Color.White,
style = MaterialTheme.typography.bodyLarge,
fontWeight = FontWeight.SemiBold,
@@ -8,6 +8,7 @@ import android.net.Uri
import android.widget.Toast
import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.contract.ActivityResultContracts
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable
@@ -49,6 +50,7 @@ import androidx.compose.material3.AssistChip
import androidx.compose.material3.DropdownMenu
import androidx.compose.material3.DropdownMenuItem
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
@@ -83,6 +85,7 @@ import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.text.input.ImeAction
import androidx.compose.ui.text.input.KeyboardCapitalization
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
import androidx.core.content.FileProvider
import androidx.lifecycle.compose.collectAsStateWithLifecycle
@@ -137,12 +140,6 @@ fun NoteEditorScreen(
val scope = rememberCoroutineScope()
val ctx = LocalContext.current
// v0.3.1.0: pick up the NoteRepository from the editor's VM (it's not
// on the ViewModel's public surface but we can grab it for the image
// viewer via the app container — see App.kt wiring for the actual
// route through. Fall back to null and disable the viewer.)
val repoForViewer = repository
// v0.3.1.0: camera permission + capture. The camera launcher is
// declared FIRST so the permission callback (below) can forward to it
// without a Kotlin forward-reference error.
@@ -284,49 +281,24 @@ fun NoteEditorScreen(
contentWindowInsets = WindowInsets.systemBars.union(WindowInsets.ime),
snackbarHost = { SnackbarHost(hostState = snackbarHost) },
topBar = {
// v0.3.6.1 Emergency Patch: left-anchored title sits against the back arrow
// (CenterAlignedTopAppBar was crowded by the six right-side actions).
// Left-anchored title (v0.3.6.1). Camera / attach-file / add-tag
// now live in the bottom action row below, so the remaining
// actions (favourite, save, overflow) always fit beside the
// title, even on narrow screens.
TopAppBar(
title = { Text(if (state.isEditing) "Edit" else "New") },
title = {
Text(
text = if (state.isEditing) "Edit note" else "New note",
maxLines = 1,
overflow = TextOverflow.Ellipsis,
)
},
navigationIcon = {
IconButton(onClick = { tryClose() }) {
Icon(Icons.AutoMirrored.Filled.ArrowBack, contentDescription = "Back")
}
},
actions = {
// v0.3.1.0: Camera (camera icon) + Attach File (paperclip icon).
IconButton(onClick = { launchCamera() }) {
Icon(
Icons.Filled.CameraAlt,
contentDescription = "Take photo",
tint = MaterialTheme.colorScheme.onSurfaceVariant,
)
}
IconButton(onClick = {
// v0.3.4.0 hotfix: the SAF picker backgrounds
// the app; with Auto-Lock = Immediate the return
// used to lock the app and wipe the unsaved note.
securityManager?.beginExternalActivity()
filePickerLauncher.launch(arrayOf("*/*"))
}) {
Icon(
Icons.Filled.AttachFile,
contentDescription = "Attach file",
tint = MaterialTheme.colorScheme.onSurfaceVariant,
)
}
IconButton(
onClick = { viewModel.openAddTagSheet() },
enabled = state.canAddMoreTags,
) {
Icon(
Icons.Filled.Tag,
contentDescription = "Add tag",
tint = if (state.canAddMoreTags)
MaterialTheme.colorScheme.onSurfaceVariant
else MaterialTheme.colorScheme.outlineVariant,
)
}
IconButton(onClick = { viewModel.toggleFavorite() }) {
Icon(
imageVector = if (state.isFavorite) Icons.Filled.Star else Icons.Outlined.StarOutline,
@@ -376,7 +348,7 @@ fun NoteEditorScreen(
// top edge of the note content (previously the row's
// `vertical = 4.dp` padding was dwarfed by the OutlinedTextField's
// intrinsic top inset, making the lower gap appear far larger).
androidx.compose.foundation.layout.Spacer(Modifier.height(12.dp))
Spacer(Modifier.height(12.dp))
Row(
modifier = Modifier
.fillMaxWidth()
@@ -394,7 +366,7 @@ fun NoteEditorScreen(
)
}
}
androidx.compose.foundation.layout.Spacer(Modifier.height(12.dp))
Spacer(Modifier.height(12.dp))
OutlinedTextField(
value = state.content,
@@ -419,7 +391,6 @@ fun NoteEditorScreen(
if (state.attachments.isNotEmpty() || state.pendingAttachments.isNotEmpty()) {
AttachmentStrip(
persisted = state.attachments,
persistedBytes = emptyMap(), // resolved lazily in the viewer
persistedViewerIds = state.attachments.associate { it.id to ViewerAttachmentId.Persisted(it.id) },
persistedOpen = { id -> viewModel.openFullScreen(id) },
persistedDelete = { id -> viewModel.deletePersistedAttachment(id) },
@@ -441,6 +412,52 @@ fun NoteEditorScreen(
tags = state.hashtags,
onRemove = { viewModel.removeTag(it) },
)
// Camera / attach-file / add-tag moved out of the title bar
// into this bottom action row so the top bar always fits
// (the six-action cluster used to crowd the title on narrow
// screens). Keep-style placement, above the nav bar /
// keyboard.
HorizontalDivider()
Row(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 8.dp, vertical = 4.dp),
verticalAlignment = Alignment.CenterVertically,
) {
IconButton(onClick = { launchCamera() }) {
Icon(
Icons.Filled.CameraAlt,
contentDescription = "Take photo",
tint = MaterialTheme.colorScheme.onSurfaceVariant,
)
}
IconButton(onClick = {
// v0.3.4.0 hotfix: the SAF picker backgrounds
// the app; with Auto-Lock = Immediate the return
// used to lock the app and wipe the unsaved note.
securityManager?.beginExternalActivity()
filePickerLauncher.launch(arrayOf("*/*"))
}) {
Icon(
Icons.Filled.AttachFile,
contentDescription = "Attach file",
tint = MaterialTheme.colorScheme.onSurfaceVariant,
)
}
IconButton(
onClick = { viewModel.openAddTagSheet() },
enabled = state.canAddMoreTags,
) {
Icon(
Icons.Filled.Tag,
contentDescription = "Add tag",
tint = if (state.canAddMoreTags)
MaterialTheme.colorScheme.onSurfaceVariant
else MaterialTheme.colorScheme.outlineVariant,
)
}
}
}
}
@@ -466,14 +483,14 @@ fun NoteEditorScreen(
// v0.3.1.0: full-screen image viewer.
state.fullScreenAttachmentId?.let { viewerId ->
if (repoForViewer != null) {
if (repository != null) {
val pendingBytes: ByteArray? = when (viewerId) {
is ViewerAttachmentId.Pending -> state.pendingAttachmentBytes[viewerId.tempId]
is ViewerAttachmentId.Persisted -> null // viewer loads from DB
}
ImageViewerScreen(
attachmentId = viewerId,
repository = repoForViewer,
repository = repository,
pendingBytes = pendingBytes,
onClose = { viewModel.closeFullScreen() },
)
@@ -497,7 +514,6 @@ fun NoteEditorScreen(
@Composable
private fun AttachmentStrip(
persisted: List<org.incido.domain.model.NoteAttachment>,
persistedBytes: Map<Long, ByteArray>,
persistedViewerIds: Map<Long, ViewerAttachmentId>,
persistedOpen: (ViewerAttachmentId) -> Unit,
persistedDelete: (Long) -> Unit,
@@ -515,7 +531,6 @@ private fun AttachmentStrip(
.fillMaxWidth()
.padding(horizontal = 16.dp, vertical = 8.dp),
horizontalArrangement = Arrangement.spacedBy(8.dp),
contentPadding = androidx.compose.foundation.layout.PaddingValues(horizontal = 0.dp),
) {
items(persisted, key = { it.id }) { att ->
AttachmentThumbnail(
@@ -581,7 +596,7 @@ private fun AttachmentThumbnail(
// handler to bail with a misleading "Loading…" Toast forever.
val lazyBytes by produceState<ByteArray?>(initialValue = null, key1 = attachmentId) {
if (pendingBytes == null && attachmentId != null && repository != null) {
value = withContext(kotlinx.coroutines.Dispatchers.IO) {
value = withContext(Dispatchers.IO) {
repository.getAttachmentBytes(attachmentId)
}
}
@@ -671,7 +686,7 @@ private fun AttachmentThumbnail(
BitmapFactory.decodeByteArray(effectiveBytes, 0, effectiveBytes.size)
}
if (bitmap != null) {
androidx.compose.foundation.Image(
Image(
bitmap = bitmap.asImageBitmap(),
contentDescription = displayName,
contentScale = ContentScale.Crop,
@@ -709,7 +724,7 @@ private fun AttachmentThumbnail(
@Composable
private fun FileTypePlaceholder(mimeType: String, displayName: String) {
androidx.compose.foundation.layout.Column(
Column(
modifier = Modifier.fillMaxSize().padding(6.dp),
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally,
@@ -720,7 +735,7 @@ private fun FileTypePlaceholder(mimeType: String, displayName: String) {
tint = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.size(28.dp),
)
androidx.compose.foundation.layout.Spacer(Modifier.size(4.dp))
Spacer(Modifier.size(4.dp))
Text(
text = displayName.take(14) + if (displayName.length > 14) "…" else "",
style = MaterialTheme.typography.labelSmall,
@@ -791,6 +806,12 @@ private fun AddTagSheet(
onDismiss: () -> Unit,
) {
val sheetState = rememberModalBottomSheetState(skipPartiallyExpanded = true)
// Auto-focus the field so the keyboard is already up by the time
// the sheet settles — one less tap to add a tag.
val tagFocusRequester = remember { FocusRequester() }
LaunchedEffect(Unit) {
runCatching { tagFocusRequester.requestFocus() }
}
ModalBottomSheet(
onDismissRequest = onDismiss,
sheetState = sheetState,
@@ -809,7 +830,9 @@ private fun AddTagSheet(
singleLine = true,
leadingIcon = { Icon(Icons.Filled.Tag, contentDescription = null) },
keyboardOptions = KeyboardOptions(capitalization = KeyboardCapitalization.None),
modifier = Modifier.fillMaxWidth(),
modifier = Modifier
.fillMaxWidth()
.focusRequester(tagFocusRequester),
)
if (suggestions.isNotEmpty()) {
Text(
@@ -27,6 +27,7 @@ import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Add
import androidx.compose.material.icons.filled.AttachFile
import androidx.compose.material.icons.filled.CheckBox
import androidx.compose.material.icons.filled.Close
import androidx.compose.material.icons.filled.Delete
import androidx.compose.material.icons.filled.Lock
import androidx.compose.material.icons.filled.Menu
@@ -58,6 +59,8 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.focus.FocusRequester
import androidx.compose.ui.focus.focusRequester
import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.asImageBitmap
@@ -122,9 +125,18 @@ fun NoteListScreen(
) {
val state by viewModel.uiState.collectAsStateWithLifecycle()
var localQuery by remember { mutableStateOf("") }
val searchFocusRequester = remember { FocusRequester() }
LaunchedEffect(filterMode) { viewModel.setFilter(filterMode) }
// Auto-focus the search field when it opens so typing can start
// immediately.
LaunchedEffect(state.isSearchActive) {
if (state.isSearchActive) {
runCatching { searchFocusRequester.requestFocus() }
}
}
Scaffold(
topBar = {
CenterAlignedTopAppBar(
@@ -171,10 +183,21 @@ fun NoteListScreen(
Text(if (filterMode == NoteFilter.Trash) "Search trash…" else "Search notes…")
},
leadingIcon = { Icon(Icons.Default.Search, contentDescription = null) },
trailingIcon = {
if (localQuery.isNotEmpty()) {
IconButton(onClick = {
localQuery = ""
viewModel.onQueryChange("")
}) {
Icon(Icons.Default.Close, contentDescription = "Clear search")
}
}
},
singleLine = true,
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 16.dp, vertical = 8.dp),
.padding(horizontal = 16.dp, vertical = 8.dp)
.focusRequester(searchFocusRequester),
)
}
@@ -333,7 +333,7 @@ class SettingsViewModel(
/** The version string baked into backup payloads and shown on
* the About card. Mirrors `app/build.gradle.kts` `versionName`
* — if you bump one, bump both. */
const val APP_VERSION = "0.3.7.0"
const val APP_VERSION = "0.3.7.1"
val Factory: ViewModelProvider.Factory = viewModelFactory {
initializer {