mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-22 21:52:28 +00:00
android, desktop: refresh stale line references in spec documents
CODE.md asks for every line reference in an affected spec document to be updated. Most of these were already stale on master. Numbers only: no wording changes. Kept apart from the feature documentation so it can be reviewed or dropped on its own. Run: 003-kotlin-directory-search, slice 7
This commit is contained in:
1 parent
33bae2658a
commit
7627e2d4eb
5 files changed
+304
-304
No files matched your search
@@ -22,7 +22,7 @@ Source: `common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ChatLis
|
||||
|
||||
## Executive Summary
|
||||
|
||||
The Chat List is the landing screen of SimpleX Chat, rendering all conversations for the active user. Built around `ChatListView` (line 179 in `ChatListView.kt`), it provides a searchable, filterable `LazyColumn` of chat previews with a toolbar, tag-based filtering, and a user-switching side panel. The view adapts between one-hand UI mode (toolbar at bottom, reversed list) and standard mode (toolbar at top). Search also accepts SimpleX links for direct connection.
|
||||
The Chat List is the landing screen of SimpleX Chat, rendering all conversations for the active user. Built around `ChatListView` (line 218 in `ChatListView.kt`), it provides a searchable, filterable `LazyColumn` of chat previews with a toolbar, tag-based filtering, and a user-switching side panel. The view adapts between one-hand UI mode (toolbar at bottom, reversed list) and standard mode (toolbar at top). Search also accepts SimpleX links for direct connection.
|
||||
|
||||
---
|
||||
|
||||
@@ -55,7 +55,7 @@ ChatListView
|
||||
|
||||
## 2. ChatListView Composable
|
||||
|
||||
**Location:** [`ChatListView.kt#L179`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ChatListView.kt#L179)
|
||||
**Location:** [`ChatListView.kt#L218`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ChatListView.kt#L218)
|
||||
|
||||
```kotlin
|
||||
fun ChatListView(
|
||||
@@ -68,8 +68,8 @@ fun ChatListView(
|
||||
|
||||
### Initialization
|
||||
|
||||
- Shows "What's New" modal on first launch after update (line ~185), with a 1-second delay.
|
||||
- On desktop, closing a chat resets audio/video players (line ~193).
|
||||
- Shows "What's New" modal on first launch after update (line ~224), with a 1-second delay.
|
||||
- On desktop, closing a chat resets audio/video players (line ~232).
|
||||
|
||||
### Layout Modes
|
||||
|
||||
@@ -90,8 +90,8 @@ The `oneHandUI` preference (`appPrefs.oneHandUI.state`) controls the layout:
|
||||
|
||||
### Android-specific
|
||||
|
||||
- `SetNotificationsModeAdditions`: Notification permission setup (line ~243).
|
||||
- `UserPicker`: Overlay side panel for user switching (line ~247).
|
||||
- `SetNotificationsModeAdditions`: Notification permission setup (line ~286).
|
||||
- `UserPicker`: Overlay side panel for user switching (line ~290).
|
||||
|
||||
---
|
||||
|
||||
@@ -115,7 +115,7 @@ The `oneHandUI` preference (`appPrefs.oneHandUI.state`) controls the layout:
|
||||
|
||||
### Active Filter Types
|
||||
|
||||
Defined as sealed class `ActiveFilter` (line ~59):
|
||||
Defined as sealed class `ActiveFilter` (line ~63):
|
||||
|
||||
```kotlin
|
||||
sealed class ActiveFilter {
|
||||
@@ -138,7 +138,7 @@ sealed class ActiveFilter {
|
||||
|
||||
### Search Filtering
|
||||
|
||||
The `filteredChats` function (line ~1474) applies filters in this order:
|
||||
The `filteredChats` function (line ~1689) applies filters in this order:
|
||||
|
||||
1. **SimpleX link match:** If a pasted link resolved to a known contact/group, show only that chat.
|
||||
2. **Text search:** Case-insensitive match against `chat.chatInfo.chatViewName`, `chat.chatInfo.fullName`, and `chat.chatInfo.localAlias`.
|
||||
@@ -149,7 +149,7 @@ The `filteredChats` function (line ~1474) applies filters in this order:
|
||||
|
||||
### Search Bar
|
||||
|
||||
`ChatListSearchBar` (line ~765) provides:
|
||||
`ChatListSearchBar` (line ~866) provides:
|
||||
- Text input with search icon.
|
||||
- SimpleX link detection: When a pasted string contains a single SimpleX link, it triggers `planAndConnect` for connection, suppressing normal search.
|
||||
- Unread filter toggle button (right side, when search is empty).
|
||||
@@ -227,7 +227,7 @@ On desktop, the currently selected chat (`chatModel.chatId.value == chat.id`) re
|
||||
|
||||
### TagsView
|
||||
|
||||
**Location:** [`ChatListView.kt#L1214`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ChatListView.kt#L1214)
|
||||
**Location:** [`ChatListView.kt#L1429`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ChatListView.kt#L1429)
|
||||
|
||||
Renders a horizontally scrollable row of tag chips (via `TagsRow`, which is a platform-specific `expect` composable).
|
||||
|
||||
@@ -325,7 +325,7 @@ Uses `AnimatedViewState` (`GONE`, `VISIBLE`, `HIDING`) with a `MutableStateFlow`
|
||||
|
||||
## 10. Crowdfunding Banner
|
||||
|
||||
**Location:** [`GetStakeBanner.kt#L31`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/GetStakeBanner.kt#L31)
|
||||
**Location:** [`GetStakeBanner.kt#L35`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/GetStakeBanner.kt#L35)
|
||||
|
||||
```kotlin
|
||||
fun GetStakeBanner(showDismiss: Boolean, onTap: () -> Unit, onDismiss: () -> Unit)
|
||||
|
||||
@@ -28,10 +28,10 @@ SimpleX Chat navigation is a platform-adaptive system implemented in `App.kt`. T
|
||||
## 1. Overview
|
||||
|
||||
```
|
||||
AppScreen (line 46)
|
||||
AppScreen (line 48)
|
||||
+-- SimpleXTheme
|
||||
+-- Surface
|
||||
+-- MainScreen (line 82)
|
||||
+-- MainScreen (line 85)
|
||||
|-- [Migration in progress] -> DefaultProgressView
|
||||
|-- [Database opening] -> DefaultProgressView
|
||||
|-- [Database error] -> DatabaseErrorView
|
||||
@@ -40,11 +40,11 @@ AppScreen (line 46)
|
||||
|-- [Onboarding complete]
|
||||
| |-- [Android]
|
||||
| | +-- AndroidWrapInCallLayout
|
||||
| | +-- AndroidScreen (line 293)
|
||||
| | +-- AndroidScreen (line 313)
|
||||
| | |-- StartPartOfScreen (ChatListView)
|
||||
| | +-- ChatView (slide-in panel)
|
||||
| +-- [Desktop]
|
||||
| +-- DesktopScreen (line 406)
|
||||
| +-- DesktopScreen (line 429)
|
||||
| |-- StartPartOfScreen + UserPicker (left column)
|
||||
| |-- ModalManager.start (overlay on left)
|
||||
| |-- CenterPartOfScreen / ChatView (center column)
|
||||
@@ -60,7 +60,7 @@ AppScreen (line 46)
|
||||
|
||||
## 2. AppScreen Composable
|
||||
|
||||
**Location:** [`App.kt#L47`](../../common/src/commonMain/kotlin/chat/simplex/common/App.kt#L47)
|
||||
**Location:** [`App.kt#L48`](../../common/src/commonMain/kotlin/chat/simplex/common/App.kt#L48)
|
||||
|
||||
```kotlin
|
||||
@Composable
|
||||
@@ -80,7 +80,7 @@ fun AppScreen()
|
||||
|
||||
## 3. MainScreen
|
||||
|
||||
**Location:** [`App.kt#L84`](../../common/src/commonMain/kotlin/chat/simplex/common/App.kt#L84)
|
||||
**Location:** [`App.kt#L85`](../../common/src/commonMain/kotlin/chat/simplex/common/App.kt#L85)
|
||||
|
||||
```kotlin
|
||||
@Composable
|
||||
@@ -101,7 +101,7 @@ fun MainScreen()
|
||||
| 6 | `onboarding == OnboardingComplete` | Platform-specific main screen |
|
||||
| 7 | Other onboarding stages | `AnimatedContent` with stage-specific views |
|
||||
|
||||
### Onboarding Complete Branch (line ~156)
|
||||
### Onboarding Complete Branch (line ~157)
|
||||
|
||||
When onboarding is complete:
|
||||
|
||||
@@ -127,7 +127,7 @@ When onboarding is complete:
|
||||
|
||||
## 4. Android Layout
|
||||
|
||||
**Location:** [`App.kt#L296`](../../common/src/commonMain/kotlin/chat/simplex/common/App.kt#L296)
|
||||
**Location:** [`App.kt#L313`](../../common/src/commonMain/kotlin/chat/simplex/common/App.kt#L313)
|
||||
|
||||
```kotlin
|
||||
@Composable
|
||||
@@ -158,7 +158,7 @@ If the device has a display cutout on horizontal sides (detected via `WindowInse
|
||||
|
||||
### Call Layout Wrapper
|
||||
|
||||
`AndroidWrapInCallLayout` (line ~279) adds a 40dp top padding when an active call is in progress (not in `WaitCapabilities` or `InvitationAccepted` state), with an `ActiveCallInteractiveArea` banner above.
|
||||
`AndroidWrapInCallLayout` (line ~298) adds a 40dp top padding when an active call is in progress (not in `WaitCapabilities` or `InvitationAccepted` state), with an `ActiveCallInteractiveArea` banner above.
|
||||
|
||||
---
|
||||
|
||||
@@ -166,7 +166,7 @@ If the device has a display cutout on horizontal sides (detected via `WindowInse
|
||||
|
||||
## 5. Desktop Layout
|
||||
|
||||
**Location:** [`App.kt#L410`](../../common/src/commonMain/kotlin/chat/simplex/common/App.kt#L410)
|
||||
**Location:** [`App.kt#L429`](../../common/src/commonMain/kotlin/chat/simplex/common/App.kt#L429)
|
||||
|
||||
```kotlin
|
||||
@Composable
|
||||
@@ -189,11 +189,11 @@ fun DesktopScreen(userPickerState: MutableStateFlow<AnimatedViewState>)
|
||||
|
||||
### Click-to-Dismiss Overlay
|
||||
|
||||
When the UserPicker is visible or a start modal is open (but no center modal), a full-size clickable overlay covers the center+right area (line ~428). Clicking it closes start modals and hides the UserPicker.
|
||||
When the UserPicker is visible or a start modal is open (but no center modal), a full-size clickable overlay covers the center+right area (line ~451). Clicking it closes start modals and hides the UserPicker.
|
||||
|
||||
### CenterPartOfScreen
|
||||
|
||||
**Location:** [`App.kt#L373`](../../common/src/commonMain/kotlin/chat/simplex/common/App.kt#L373)
|
||||
**Location:** [`App.kt#L390`](../../common/src/commonMain/kotlin/chat/simplex/common/App.kt#L390)
|
||||
|
||||
- When `chatId` is null and no center modals: shows "No selected chat" placeholder.
|
||||
- When `chatId` is null and center modals open: shows `ModalManager.center`.
|
||||
@@ -202,7 +202,7 @@ When the UserPicker is visible or a start modal is open (but no center modal), a
|
||||
|
||||
### StartPartOfScreen
|
||||
|
||||
**Location:** [`App.kt#L352`](../../common/src/commonMain/kotlin/chat/simplex/common/App.kt#L352)
|
||||
**Location:** [`App.kt#L369`](../../common/src/commonMain/kotlin/chat/simplex/common/App.kt#L369)
|
||||
|
||||
Routes between:
|
||||
- `SetDeliveryReceiptsView` (if `chatModel.setDeliveryReceipts` is true)
|
||||
@@ -213,7 +213,7 @@ Routes between:
|
||||
|
||||
## 6. ModalManager
|
||||
|
||||
**Location:** `common/src/commonMain/kotlin/chat/simplex/common/views/helpers/ModalView.kt` (line 92)
|
||||
**Location:** `common/src/commonMain/kotlin/chat/simplex/common/views/helpers/ModalView.kt` (line 97)
|
||||
|
||||
```kotlin
|
||||
class ModalManager(private val placement: ModalPlacement?)
|
||||
@@ -294,7 +294,7 @@ object AppLock {
|
||||
|
||||
### Authentication Flow
|
||||
|
||||
1. **MainScreen** checks `unauthorized` (derived: `userAuthorized.value != true`) at line ~135.
|
||||
1. **MainScreen** checks `unauthorized` (derived: `userAuthorized.value != true`) at line ~138.
|
||||
2. If unauthorized, including during an active call:
|
||||
- Launches `AppLock.runAuthenticate()` which triggers platform-specific biometric/passcode prompt.
|
||||
- On Android with system auth finishing during activity destruction, authentication is skipped.
|
||||
@@ -303,7 +303,7 @@ object AppLock {
|
||||
|
||||
### Lock Delay
|
||||
|
||||
The `laLockDelay` preference controls how long after backgrounding the app requires re-authentication. When `laLockDelay == 0`, screen rotation triggers a 3-second grace period (line ~270) to prevent unnecessary re-auth. A call counts as activity: `recheckAuthState()` is a no-op while `showCallView` is true, and `CallManager.endCall()` resets `enteredBackground`, so the delay is counted from the end of the call. When a call is accepted from a notification or from the Android lock screen, `recheckAuthState()` is called before `acceptIncomingCall()`, so an expired delay still locks the app.
|
||||
The `laLockDelay` preference controls how long after backgrounding the app requires re-authentication. When `laLockDelay == 0`, screen rotation triggers a 3-second grace period (line ~265) to prevent unnecessary re-auth. A call counts as activity: `recheckAuthState()` is a no-op while `showCallView` is true, and `CallManager.endCall()` resets `enteredBackground`, so the delay is counted from the end of the call. When a call is accepted from a notification or from the Android lock screen, `recheckAuthState()` is called before `acceptIncomingCall()`, so an expired delay still locks the app.
|
||||
|
||||
### Lock Modes
|
||||
|
||||
@@ -312,7 +312,7 @@ The `laLockDelay` preference controls how long after backgrounding the app requi
|
||||
|
||||
### First-Time Lock Notice
|
||||
|
||||
`showLANotice` (line ~33 in `AppLock.kt`) prompts users to enable SimpleX Lock when they have more than 3 chats, have not yet been shown the notice, and have not enabled lock. On Android, it offers a choice between system auth and passcode.
|
||||
`showLANotice` (line ~34 in `AppLock.kt`) prompts users to enable SimpleX Lock when they have more than 3 chats, have not yet been shown the notice, and have not enabled lock. On Android, it offers a choice between system auth and passcode.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in new issue
Block a user