mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-25 06:25:51 +00:00
multiplatform: improve new and existing chat interactions - new chat sheet, one hand ui, info views action buttons; new modes of contact deletion (keep conversation, only delete conversation) (#4435)
* android, desktop: added action buttons and delete to contact card, added toolbar * android, desktop: added setting for one hand ui * android: implemented one hand ui for chat list screen (#4448) * android: implemented one hand ui for chat list screen * android, desktop: remove extra toolbar * android: fixed user picker positioning * android, desktop: new chat sheet (#4479) * (early draft) android, desktop: new chat sheet * first draft * android, desktop: new chat UI improvements * android, desktop: removed group connections not needed, missunderstanding in requirements * android, desktop: deleted contacts and requests * android, desktop: showing only actionable contacts * android, desktop: made full new chat sheet scrollable * android, desktop: handled empty lists * refactor: fixed fn access scopes * android, desktop: made sure contacts list refreshes on changes * android: removed one hand ui for new chat sheet * android, desktop: removed no longer used code * android: moved new chat button to toolbar for one hand ui * removed unused imports * android, desktop: remove favorite contact set functionality from new chat sheet * android, desktop: improved chat redirect * android, desktop: removed padding from contact rows * android, desktop: improved paddings * android, desktop: started to use accent color for contact cards and requests * android, desktop: fixed modals and improved contact stage tracking * android, desktop: made deleted contacts contactable * android, desktop: allowed for simplex links to be pasted in new chat sheet * android, desktop: added interaction for contact cards * close modal * android, desktop: started to hide cards from chat list * android, desktop: translations cleanup * android, desktop: started to mark deleted chat as non deleted when open from new chat sheet * android, desktop: fixed link pastes for existing connections * android, desktop: redirect to groups when group links are pasted in new chat sheet * move one hand ui toggle * refactor * on contact card interaction only close new chat sheet on connect * android, desktop: removed usages of connection stage enum * android, desktop: stopped preloading active chats on new chat sheet * android: fixed invitation cleanup * desktop: fixed invitation cleanup * desktop: improved consistency on modals to close * desktop: added small delay to focus re-position logic to avoid focus change cancelling click events * android, desktop: made add contact learn more smaller to avoid header becoming bigger than expected * android, desktop: redirect to chat on accept if send is ready --------- Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> * android, desktop: hide new chat sheet action buttons when search text is not empty instead of when search is focused (#4529) * android, desktop: contacts, groups and group member action buttons (#4523) * android, desktop: made action buttons round * android, desktop: updated action buttons for contacts * android, desktop: added action buttons for groups * android, desktop: removed context menu items * android, desktop: cleaned up visuals and paddings for contact and group card action buttons * android, desktop: improved modal close logic * android, desktop: improved search * adjust color, fix paddings * android, desktop: avoided async calls to open chats and simplified search as result * android, desktop: moved mute button to the end on group view to match chat view * android, desktop: made filling of icons consistent * android, desktop: fixed contacts sheet close and dismiss actions on contact connection * order --------- Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> * android, desktop: streamlined delete actions based on contact type (#4538) * android, desktop: streamlined delete actions based on contact type * removed unused translations * refactor, adjust texts * move toggle closer to buttons * fix text * fix accept request * android, desktop: made sure deleted contacts update on deletes --------- Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> * restore deleted file * desktop: stop closing modal on message search * android, desktop: remove scroll preservation on new chat sheet unmount * android, desktop: add functionality to search inside deleted conversation on main new chat sheet screen * android, desktop: fixed attachment bug when clicking contact with keyboard open inside new chat sheet * desktop, android: set incognito contacts color to Indigo in contact list * remove unused code * remove openedFromChatView * android, desktop: change icon for contact requests and added icon for contact cards * refactor * fix paddings * fix padding * refactor * android, desktop: fix attachment issue for deleted contacts * remove unused * android: invert new chat sheet on one hand ui * info buttons alerts * info buttons paddings * android: one hand ui for new chat sheet and deleted chats * fix build after latest master changes on chat model and mutations in chat * android,desktop: add menu items back * add scrollbars to new chat sheet * desktop: inactivate and rephrase scan since it is not supported * android: one hand ui for forward chat list * android, desktop: fix for no chats in one hand ui * desktop: use left side of screen for new chat actions * desktop: close end modal when new chat sheet is clicked * android: fix no filtered contacts on delete contacts view * fix scrollbar not showing * android: few adjustmnets in one hand ui * change icon * increase icon size --------- Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com> Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> Co-authored-by: Avently <7953703+avently@users.noreply.github.com>
This commit is contained in:
+7
@@ -6,6 +6,7 @@ import androidx.compose.material.Divider
|
||||
import androidx.compose.runtime.*
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.scale
|
||||
import androidx.compose.ui.unit.dp
|
||||
import chat.simplex.common.platform.onRightClick
|
||||
import chat.simplex.common.views.helpers.*
|
||||
@@ -19,8 +20,14 @@ actual fun ChatListNavLinkLayout(
|
||||
disabled: Boolean,
|
||||
selectedChat: State<Boolean>,
|
||||
nextChatSelected: State<Boolean>,
|
||||
oneHandUI: State<Boolean>
|
||||
) {
|
||||
var modifier = Modifier.fillMaxWidth()
|
||||
|
||||
if (oneHandUI != null && oneHandUI.value) {
|
||||
modifier = modifier.scale(scaleX = 1f, scaleY = -1f)
|
||||
}
|
||||
|
||||
if (!disabled) modifier = modifier
|
||||
.combinedClickable(onClick = click, onLongClick = { showMenu.value = true })
|
||||
.onRightClick { showMenu.value = true }
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ private val CALL_BOTTOM_ICON_OFFSET = (-15).dp
|
||||
private val CALL_BOTTOM_ICON_HEIGHT = CALL_INTERACTIVE_AREA_HEIGHT + CALL_BOTTOM_ICON_OFFSET
|
||||
|
||||
@Composable
|
||||
actual fun ActiveCallInteractiveArea(call: Call, newChatSheetState: MutableStateFlow<AnimatedViewState>) {
|
||||
actual fun ActiveCallInteractiveArea(call: Call) {
|
||||
val onClick = { platform.androidStartCallActivity(false) }
|
||||
Box(Modifier.offset(y = CALL_TOP_OFFSET).height(CALL_INTERACTIVE_AREA_HEIGHT)) {
|
||||
val source = remember { MutableInteractionSource() }
|
||||
|
||||
+3
-1
@@ -78,7 +78,7 @@ fun AppearanceScope.AppearanceLayout(
|
||||
Modifier.fillMaxWidth(),
|
||||
) {
|
||||
AppBarTitle(stringResource(MR.strings.appearance_settings))
|
||||
SectionView(stringResource(MR.strings.settings_section_title_language), padding = PaddingValues()) {
|
||||
SectionView(stringResource(MR.strings.settings_section_title_interface), padding = PaddingValues()) {
|
||||
val context = LocalContext.current
|
||||
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
// SectionItemWithValue(
|
||||
@@ -104,6 +104,8 @@ fun AppearanceScope.AppearanceLayout(
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
SettingsPreferenceItem(icon = null, stringResource(MR.strings.one_hand_ui), ChatModel.controller.appPrefs.oneHandUI)
|
||||
}
|
||||
|
||||
SectionDividerSpaced(maxTopPadding = true)
|
||||
|
||||
Reference in New Issue
Block a user