mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-07-12 16:09:00 +00:00
Remove the now-dead SIMPLEX link CompositionLocal
Making links a static accent left LocalSimplexLinkColor providing exactly what linkStyle already falls back to (the primary colour), so the CompositionLocal, its provider in FramedItemView, and the elvis fallback no longer change anything. Remove all three. Also clean up two comments the earlier subtraction left behind: the axis comment still said secondary text samples the gradient (it uses a flat tint now), and an orphaned line that had introduced the removed LINK_STOPS.
This commit is contained in:
+1
-1
@@ -4850,7 +4850,7 @@ sealed class Format {
|
||||
val isSimplexLink = this is SimplexLink
|
||||
|
||||
companion object {
|
||||
val linkStyle @Composable get() = SpanStyle(color = LocalSimplexLinkColor.current ?: MaterialTheme.colors.primary, textDecoration = TextDecoration.Underline)
|
||||
val linkStyle @Composable get() = SpanStyle(color = MaterialTheme.colors.primary, textDecoration = TextDecoration.Underline)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-4
@@ -21,14 +21,11 @@ import kotlin.math.cos
|
||||
import kotlin.math.sin
|
||||
|
||||
// SIMPLEX 20°-tilted "sunrise" axis spans the whole chat surface (top app bar to compose bar).
|
||||
// Bubble backgrounds and secondary text sample stops along this same axis so colour rises
|
||||
// Bubble backgrounds sample stops along this same axis so colour rises
|
||||
// from bottom-left dark to top-right warm in one coordinated motion across the screen.
|
||||
|
||||
private const val SIMPLEX_TILT_DEG = 20f
|
||||
|
||||
// Per-wallpaper gradient stops live in PresetWallpaper._simplexStops (ChatWallpaper.kt).
|
||||
val LocalSimplexLinkColor = compositionLocalOf<Color?> { null }
|
||||
|
||||
class ChatViewportInfo(
|
||||
val sizePx: State<IntSize>,
|
||||
val originInWindow: State<Offset>,
|
||||
|
||||
-2
@@ -211,7 +211,6 @@ fun FramedItemView(
|
||||
.clipChatItem(ci, tailVisible, revealed = true)
|
||||
.chatBubbleBackground(sent = sent, isQuote = false, transparent = transparentBackground)) {
|
||||
var metaColor: Color? = null
|
||||
CompositionLocalProvider(LocalSimplexLinkColor provides MaterialTheme.colors.primary) {
|
||||
Box(contentAlignment = Alignment.BottomEnd) {
|
||||
val chatItemTail = remember { appPreferences.chatItemTail.state }
|
||||
val style = shapeStyle(ci, chatItemTail.value, tailVisible, true)
|
||||
@@ -375,7 +374,6 @@ fun FramedItemView(
|
||||
CIMetaView(ci, chatTTL, metaColor, showViaProxy = showViaProxy, showTimestamp = showTimestamp)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user