Skip to content
Open
46 changes: 27 additions & 19 deletions app/src/main/kotlin/com/wisp/app/ui/component/ActionBar.kt
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,16 @@ fun ActionBar(
modifier = Modifier.size(22.dp)
)
}
Text(
text = replyCount.toString(),
style = MaterialTheme.typography.labelSmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
maxLines = 1
)
// Hide the count when zero — matches iOS minimalistic action bar
// where empty metrics drop entirely instead of showing "0".
if (replyCount > 0) {
Text(
text = replyCount.toString(),
style = MaterialTheme.typography.labelSmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
maxLines = 1
)
}
// React + Zap are available on private replies as gift-wrapped/DIP-03 actions.
// Repost / Quote stay hidden on private replies because those events would
// publicly attach an e-tag pointing at the encrypted rumor id.
Expand Down Expand Up @@ -160,12 +164,14 @@ fun ActionBar(
)
}
}
Text(
text = likeCount.toString(),
style = MaterialTheme.typography.labelSmall,
color = if (userReactionEmojis.isNotEmpty()) WispThemeColors.zapColor else MaterialTheme.colorScheme.onSurfaceVariant,
maxLines = 1
)
if (likeCount > 0) {
Text(
text = likeCount.toString(),
style = MaterialTheme.typography.labelSmall,
color = if (userReactionEmojis.isNotEmpty()) WispThemeColors.zapColor else MaterialTheme.colorScheme.onSurfaceVariant,
maxLines = 1
)
}
if (!isPrivate) {
Spacer(Modifier.width(8.dp))
Box {
Expand All @@ -191,12 +197,14 @@ fun ActionBar(
)
}
}
Text(
text = repostCount.toString(),
style = MaterialTheme.typography.labelSmall,
color = if (hasUserReposted) WispThemeColors.repostColor else MaterialTheme.colorScheme.onSurfaceVariant,
maxLines = 1
)
if (repostCount > 0) {
Text(
text = repostCount.toString(),
style = MaterialTheme.typography.labelSmall,
color = if (hasUserReposted) WispThemeColors.repostColor else MaterialTheme.colorScheme.onSurfaceVariant,
maxLines = 1
)
}
}
Spacer(Modifier.width(8.dp))
Box {
Expand Down Expand Up @@ -247,7 +255,7 @@ fun ActionBar(
)
}
}
if (!isZapInProgress) {
if (!isZapInProgress && zapSats > 0) {
val context = LocalContext.current
val fiatPrefs = remember { FiatPreferences.get(context) }
fiatPrefs.fiatMode.collectAsState().value
Expand Down
25 changes: 22 additions & 3 deletions app/src/main/kotlin/com/wisp/app/ui/component/BottomBar.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import androidx.compose.material.icons.outlined.Search
import androidx.compose.material3.Icon
import androidx.compose.ui.res.painterResource
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.asPaddingValues
import androidx.compose.foundation.layout.height
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.NavigationBar
Expand All @@ -28,6 +30,7 @@ import androidx.compose.material3.NavigationBarItemDefaults
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.layout.layout
import androidx.compose.ui.unit.dp
Expand Down Expand Up @@ -73,7 +76,18 @@ fun WispBottomBar(
color = MaterialTheme.colorScheme.outlineVariant.copy(alpha = 0.5f)
)
NavigationBar(
containerColor = MaterialTheme.colorScheme.surface,
// Match the body color (background) instead of Material's
// default surface tone — iOS uses one near-black across body
// + chrome and reserves the lighter "surface" for elevated
// controls (pills, cards).
containerColor = MaterialTheme.colorScheme.background,
// Material's default 80dp NavigationBar reserves a tall slot
// for labels we never render — clamp to 56dp + the gesture
// inset for a chrome height closer to the iOS tab bar.
modifier = Modifier.height(
56.dp + NavigationBarDefaults.windowInsets
.asPaddingValues().calculateBottomPadding()
),
windowInsets = NavigationBarDefaults.windowInsets
) {
visibleTabs.forEach { tab ->
Expand All @@ -92,7 +106,9 @@ fun WispBottomBar(
colors = NavigationBarItemDefaults.colors(
selectedIconColor = MaterialTheme.colorScheme.primary,
unselectedIconColor = MaterialTheme.colorScheme.onSurfaceVariant,
indicatorColor = MaterialTheme.colorScheme.surfaceVariant
// Drop the active-pill indicator — the orange tint on
// the selected icon is enough signal (matches iOS).
indicatorColor = Color.Transparent
),
icon = {
val useBolt = com.wisp.app.ui.util.useBoltIcon()
Expand Down Expand Up @@ -129,13 +145,16 @@ fun WispBottomBar(
)
}
if (hasUnread) {
// Notification dot uses iOS-standard badge red
// (#FF3B30) instead of the primary accent so it
// reads as "alert" rather than "branded highlight."
Box(
modifier = Modifier
.size(8.dp)
.align(Alignment.TopEnd)
.offset(x = 2.dp, y = (-2).dp)
.background(
color = MaterialTheme.colorScheme.primary,
color = Color(0xFFFF3B30),
shape = CircleShape
)
)
Expand Down
16 changes: 12 additions & 4 deletions app/src/main/kotlin/com/wisp/app/ui/component/PostCard.kt
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,12 @@ fun PostCard(
}
}

// Wrap content + divider so the divider can run full-width while the
// content keeps its 16dp horizontal padding. Tap-to-open lives on the
// content Column so the (tiny) divider area isn't tappable.
Column(modifier = modifier.fillMaxWidth()) {
Column(
modifier = modifier
modifier = Modifier
.fillMaxWidth()
.then(if (onNoteClick != null) Modifier.pointerInput(onNoteClick) {
awaitEachGesture {
Expand Down Expand Up @@ -875,9 +879,13 @@ fun PostCard(
}
}
}
if (showDivider) {
HorizontalDivider(color = MaterialTheme.colorScheme.outline, thickness = 0.5.dp)
}
}
if (showDivider) {
// Full-bleed inter-post separator — sits outside the content
// Column's 16dp horizontal padding so it spans edge to edge,
// matching the iOS feed.
HorizontalDivider(color = MaterialTheme.colorScheme.outline, thickness = 0.5.dp)
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ fun ArticleScreen(
}
},
colors = TopAppBarDefaults.topAppBarColors(
containerColor = MaterialTheme.colorScheme.surface
containerColor = MaterialTheme.colorScheme.background
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ fun BlossomServersScreen(
}
},
colors = TopAppBarDefaults.topAppBarColors(
containerColor = MaterialTheme.colorScheme.surface
containerColor = MaterialTheme.colorScheme.background
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ fun BookmarkSetScreen(
}
},
colors = TopAppBarDefaults.topAppBarColors(
containerColor = MaterialTheme.colorScheme.surface
containerColor = MaterialTheme.colorScheme.background
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ fun BookmarksScreen(
}
},
colors = TopAppBarDefaults.topAppBarColors(
containerColor = MaterialTheme.colorScheme.surface
containerColor = MaterialTheme.colorScheme.background
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ fun CommunityScreen(
}
},
colors = TopAppBarDefaults.topAppBarColors(
containerColor = MaterialTheme.colorScheme.surface
containerColor = MaterialTheme.colorScheme.background
)
)
}
Expand Down
9 changes: 7 additions & 2 deletions app/src/main/kotlin/com/wisp/app/ui/screen/ComposeScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ fun ComposeScreen(
}
},
colors = TopAppBarDefaults.topAppBarColors(
containerColor = MaterialTheme.colorScheme.surface
containerColor = MaterialTheme.colorScheme.background
)
)
}
Expand Down Expand Up @@ -1267,6 +1267,11 @@ fun ComposeScreen(
}
}
} else {
// Publish is disabled until the post has at least one
// character of text OR at least one uploaded attachment.
// Prevents accidental empty posts and matches the iOS
// composer's send-button gating.
val hasContent = content.text.isNotBlank() || uploadedUrls.isNotEmpty()
Button(
onClick = {
viewModel.publish(
Expand All @@ -1282,7 +1287,7 @@ fun ComposeScreen(
resolvedEmojis = resolvedEmojis
)
},
enabled = !publishing && !isMiningBusy,
enabled = !publishing && !isMiningBusy && hasContent,
modifier = Modifier.fillMaxWidth().height(44.dp),
contentPadding = PaddingValues(0.dp)
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ fun ContactPickerScreen(
}
},
colors = TopAppBarDefaults.topAppBarColors(
containerColor = MaterialTheme.colorScheme.surface
containerColor = MaterialTheme.colorScheme.background
)
)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ fun DmConversationScreen(
}
},
colors = TopAppBarDefaults.topAppBarColors(
containerColor = MaterialTheme.colorScheme.surface
containerColor = MaterialTheme.colorScheme.background
)
)

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/kotlin/com/wisp/app/ui/screen/DmListScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ fun DmListScreen(
}
},
colors = TopAppBarDefaults.topAppBarColors(
containerColor = MaterialTheme.colorScheme.surface
containerColor = MaterialTheme.colorScheme.background
)
)
},
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/kotlin/com/wisp/app/ui/screen/DraftsScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ fun DraftsScreen(
}
},
colors = TopAppBarDefaults.topAppBarColors(
containerColor = MaterialTheme.colorScheme.surface
containerColor = MaterialTheme.colorScheme.background
)
)
}
Expand Down
17 changes: 15 additions & 2 deletions app/src/main/kotlin/com/wisp/app/ui/screen/FeedScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.asPaddingValues
import androidx.compose.foundation.layout.statusBars
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
Expand Down Expand Up @@ -125,6 +127,7 @@ import androidx.compose.material.icons.filled.Close
import androidx.compose.material.icons.automirrored.outlined.Article
import androidx.compose.material.icons.outlined.CurrencyBitcoin
import androidx.compose.material.icons.outlined.Dashboard
import androidx.compose.material.icons.outlined.GridView
import androidx.compose.material.icons.outlined.HowToVote
import androidx.compose.material.icons.outlined.Photo
import androidx.compose.material.icons.outlined.FavoriteBorder
Expand Down Expand Up @@ -749,6 +752,14 @@ fun FeedScreen(
contentWindowInsets = WindowInsets(0, 0, 0, 0),
topBar = {
CenterAlignedTopAppBar(
// Material's default 64dp content + status-bar inset
// pads a chunky gap below the icon row. Clamp to 48dp
// + status-bar inset so the chrome lands closer to
// the iOS navigation bar (~44dp content + safe-area).
modifier = Modifier.height(
48.dp + WindowInsets.statusBars
.asPaddingValues().calculateTopPadding()
),
title = {
Box {
Surface(
Expand Down Expand Up @@ -867,7 +878,7 @@ fun FeedScreen(
}
},
colors = TopAppBarDefaults.topAppBarColors(
containerColor = MaterialTheme.colorScheme.surface
containerColor = MaterialTheme.colorScheme.background
),
navigationIcon = {
Row(verticalAlignment = Alignment.CenterVertically) {
Expand All @@ -888,7 +899,9 @@ fun FeedScreen(
modifier = Modifier.size(36.dp)
) {
val (icon, tint) = when (contentFilter) {
FeedContentFilter.ALL -> Icons.Outlined.Dashboard to MaterialTheme.colorScheme.onSurfaceVariant
// GridView = 2x2 of equal squares (matches iOS).
// Dashboard was 1 large + 3 small panels.
FeedContentFilter.ALL -> Icons.Outlined.GridView to MaterialTheme.colorScheme.onSurfaceVariant
FeedContentFilter.TEXT_ONLY -> Icons.AutoMirrored.Outlined.Article to MaterialTheme.colorScheme.primary
FeedContentFilter.GALLERY_ONLY -> Icons.Outlined.Photo to MaterialTheme.colorScheme.primary
FeedContentFilter.POLLS_ONLY -> Icons.Outlined.HowToVote to MaterialTheme.colorScheme.primary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ fun GroupDetailScreen(
}
},
colors = TopAppBarDefaults.topAppBarColors(
containerColor = MaterialTheme.colorScheme.surface
containerColor = MaterialTheme.colorScheme.background
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ fun GroupRoomScreen(
}
},
colors = TopAppBarDefaults.topAppBarColors(
containerColor = MaterialTheme.colorScheme.surface
containerColor = MaterialTheme.colorScheme.background
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ fun HashtagFeedScreen(
}
},
colors = TopAppBarDefaults.topAppBarColors(
containerColor = MaterialTheme.colorScheme.surface
containerColor = MaterialTheme.colorScheme.background
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ fun InterfaceScreen(
}
},
colors = TopAppBarDefaults.topAppBarColors(
containerColor = MaterialTheme.colorScheme.surface
containerColor = MaterialTheme.colorScheme.background
)
)
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/kotlin/com/wisp/app/ui/screen/ListScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ fun ListScreen(
}
},
colors = TopAppBarDefaults.topAppBarColors(
containerColor = MaterialTheme.colorScheme.surface
containerColor = MaterialTheme.colorScheme.background
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ fun ListsHubScreen(
}
},
colors = TopAppBarDefaults.topAppBarColors(
containerColor = MaterialTheme.colorScheme.surface
containerColor = MaterialTheme.colorScheme.background
)
)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ fun LiveStreamScreen(
}
},
colors = TopAppBarDefaults.topAppBarColors(
containerColor = MaterialTheme.colorScheme.surface
containerColor = MaterialTheme.colorScheme.background
)
)

Expand Down
Loading