mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-04-25 22:52:12 +00:00
* ios: chat delete mode api
* redesign wip
* wip
* filter button right of search
* rework navigation (mostly works?)
* remove modifier
* search in bottom bar
* make filter button easier to press
* increase button size
* customizable search position
* reverse chat list wip
* change material
* list going behind toolbars
* increase spacing
* rework wip
* rework, sheets
* more scale effect
* remove search buttons, rework filter button
* remove onboarding buttons
* scan/paste menu
* wip
* contacts wip
* sizes
* remove unnecessary modifier
* contacts navigation wip
* paddings
* rework chat info view approach
* comment
* comment
* verified marker
* comment
* fix list not updating
* delete contact/conversation
* delete via chat list (has bugs)
* comment
* swipe on contact list
* fixes
* buttons wip
* message button to open chat
* buttons disabled
* call buttons work from sheet
* call button from contacts
* fix buttons
* show keyboard attempts
* Revert "show keyboard attempts"
This reverts commit daa50d1aa9.
* comment
* mark contact chat as not deleted when opening from contacts
* move to old view
* dont reverse contacts in one-hand mode
* change icons
* simplify call buttons (revert to make calls from chat view)
* top bar, reduce padding
* increase filter button size
* support for contact cards
* fix some delete conversation bugs
* fix chat not being removed from list on deleting conversation
* add to app settings
* member view buttons
* icons
* remove unused code
* padding
* avatar
* resize avatar
* button
* add open button for deleted contact
* add deletedByUser status
* rework delete actions
* filter button in contacts list
---------
Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
60 lines
1.4 KiB
Swift
60 lines
1.4 KiB
Swift
//
|
|
// NewChatMenuButton.swift
|
|
// SimpleX (iOS)
|
|
//
|
|
// Created by spaced4ndy on 28.11.2023.
|
|
// Copyright © 2023 SimpleX Chat. All rights reserved.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
enum NewChatMenuOption: Identifiable {
|
|
case newContact
|
|
case scanPaste
|
|
case newGroup
|
|
|
|
var id: Self { self }
|
|
}
|
|
|
|
struct NewChatMenuButton: View {
|
|
@Binding var newChatMenuOption: NewChatMenuOption?
|
|
|
|
var body: some View {
|
|
Menu {
|
|
Button {
|
|
newChatMenuOption = .newContact
|
|
} label: {
|
|
Text("Add contact")
|
|
}
|
|
Button {
|
|
newChatMenuOption = .scanPaste
|
|
} label: {
|
|
Text("Scan / Paste link")
|
|
}
|
|
Button {
|
|
newChatMenuOption = .newGroup
|
|
} label: {
|
|
Text("Create group")
|
|
}
|
|
} label: {
|
|
Image(systemName: "square.and.pencil")
|
|
.resizable()
|
|
.scaledToFit()
|
|
.frame(width: 24, height: 24)
|
|
}
|
|
.sheet(item: $newChatMenuOption) { opt in
|
|
switch opt {
|
|
case .newContact: NewChatView(selection: .invite)
|
|
case .scanPaste: NewChatView(selection: .connect, showQRCodeScanner: true)
|
|
case .newGroup: AddGroupView()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
NewChatMenuButton(
|
|
newChatMenuOption: Binding.constant(nil)
|
|
)
|
|
}
|