Commit graph

62 commits

Author SHA1 Message Date
Evgeny
8d54acef92
ios: only handle taps on messages with links or secrets, use image for secret markdown (#5885)
* ios: use image for secret markdown

* remove unnecessary ViewBuilders
2025-05-11 14:15:14 +01:00
Evgeny
4b42a19ccb
ios: fix XCode 16 regressions (tap not working on files, quotes, images, voice messages, etc.), open link previews on tap (#5880)
* ios: fix XCode 16 regressions (tap not working on files, quotes, images, voice messages, etc.), open link previews on tap

* fix voice recording

* fix video, accepting calls from chat, preference toggles in chat

* WIP message and meta

* handle links in attributed strings

* custom attribute for links to prevent race conditions with default tap handler
2025-05-10 14:37:45 +01:00
Stanislav Dmitrenko
9d1329498b
ios: open chat on first unread, "scroll" to quoted items that were not loaded (#5392)
* ios: open chat on first unread, "scroll" to quoted items that were not loaded

* more changes

* changes

* unused

* fix reveal logic

* debug

* changes

* test

* Revert "test"

This reverts commit 553be124d5.

* change

* change

* changes

* changes

* changes

* commented deceleration logic

* changes

* fixes

* optimized item identifiers to use merged item directly

* fixed counters

* encreased initial and preload counters

* fix initial loading and trimming items

* optimize

* allow marking read

* 10 instead of 5

* performance

* one more parameter in hash

* disable trimming

* performance

* performance - in background

* optimization

* next/prev

* changes

* markread

* finally

* less logs

* read

* change after merge

* trimming, edge cases

* wait until items loaded

* Revert "wait until items loaded"

This reverts commit 895218b978.

* progress indicator

* optimization

* disable scroll helper

* experiment

* Revert "experiment"

This reverts commit c952c9e623.

* jump

* no read

* layoutIfNeeded

* changes

* EndlessScrollView

* read

* changes

* changes

* changes

* reduce time to open a chat (by ~300ms)

* open from the first unread when clicking member chat

* refactored and removed unused code

* handling search emptiness to scroll to correct position

* changes

* read state maintain

* remove protocol

* avoid parsing chatId

* pass chat

* changes

* remove reveal

* refactor spaghetti

* remove ItemsScrollModel

* rename

* remove setUpdateListener

* unused

* optimization

* scrollToTop

* fix

* scrollbar working again

* scrollToBottom

* fix

* scrollBar hiding when not many items on screen

* small safer change

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2025-02-17 18:21:40 +00:00
Diogo
517679e2df
ios: group member mentions (#5593)
* api types

* display for mentions and replys

* picking of mentions

* notifications (wip)

* auto tagging

* show selected mention

* Divider and list bg

* stop keyboard dismiss on scroll from ios 16

* change notification mode in all views

* icon for mentions notification mode

* make unread states work in memory and chat preview

* preview fixes

* fix unread status when mark read manually

* update library

* fixed padding

* fix layout

* use memberName

* remove ChatNtfs, show mentions in context items and in drafts, make mentions a map in ComposeState

* rework mentions (WIP)

* better

* show mention name containing @ in quotes

* editing mentions

* editing

* mentionColor

* opacity

* refactor mention counter

* fix unread layout

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2025-02-03 20:47:32 +00:00
Diogo
7e344b3ee8
ios: reports inline (#5466)
* initial types

* changes types

* decode

* possible mock for inline report

* remove avatar

* diff

* updates

* parser and display message

* send messages and support placeholder

* profile reports and all reports working

* new api

* check member support for receiving reports

* report chat item text

* moderator role

* placeholder on text compose for report

* rename method

* remove need to have reported item in memory to action

* archived reports

* changes/fix

* fix block member

* delete and moderate

* archive

* report reason

* context menu/moderation fixes

* typo

* not needed

* report reason as caption, and change text

* remove auto archive

* move placeholder to match text

* prefix red italic report

* archive

* apply mark deleted fix

* Revert "apply mark deleted fix"

This reverts commit b12f14c0f5.

* remove extra space

* context menu rework

* strings, icons

* recheck items extra check on reports

* simplify

* simpler

* reports: never show for own messages, disable attachments, hide when recording or live

* style, allow local deletion

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2025-01-08 18:28:45 +00:00
Arturs Krumins
de94892fe7
ios: replace revealed bindings with constant value (#5027) 2024-10-15 08:58:54 +01:00
Arturs Krumins
1f3355921c
ios: make message information on media readable (#4820)
* ios: ensure legibility of elements rendered over media

* reduce diff

* match meta padding

* material play background

* remove circlebadge

* progress circle

* meta color modes

* refactor

* conditional space

* fix

* fix2

* fix3

* revert video buttons

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2024-09-06 12:36:54 +01:00
Evgeny
71bea947a5
ios: cache base64 images (#4827) 2024-09-04 14:49:01 +01:00
Arturs Krumins
0b0b78293f
ios: fix inaccurate floating unread counters in chat message view (#4781)
* ios: fix inaccurate floating unread counters in chat message view

* account for inset; remove old on appear/disappear blocks

* revert id

* first visible

* remove UnreadChatItemCounts

* cleanup

* revert duplicates

* add todo

* throttle first

* cleanup

* lines

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2024-08-29 17:25:08 +01:00
Arturs Krumins
043a4ed915
ios: add chat message tail and roundness settings; date separators (#4764)
* ios: add chat message tail and roundness settings

* cleanup

* minor

* rename

* date separator

* revert max roundness to pills

* increase default roundness to 1

* minor

* out of bounds tails, style date separator

* formatting

* hardcode tail growth

* revert

* different shape (WIP)

* tail

* rename

* square

* only show tail for the last message

* remove func

* capture less

* variable tail height

* export localizations

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2024-08-27 14:30:07 +01:00
Arturs Krumins
b0e0b0beb8
remove text slection context menu from chat item (#4699) 2024-08-15 20:08:51 +01:00
Arturs Krumins
7f08f87ee4
ios: improve conversation scrolling (fixes hangs when messages are updated). (#4534)
* ios: fix hang while updating chat item state

* throttle item update

* fix

* remove buttons, switch back to Debug

* remove items getter/setter from ChatModel

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2024-07-29 21:17:14 +01:00
Stanislav Dmitrenko
6fca6c22c5
ios: interactive media and link previews in the list of chats (#4487)
* ios: interactive media and link previews in the list of chats

* commented out voice preview

* voice message support and various fixes

* changes to video

* changes

* playing voice in chat list with scrolling

* revert

This reverts commit 60f57403d1.

* prevent feedback loop

* version of dependency

* voice

* fix param

* working voice

* reacting on messages and chat deletion

* fix two videos in a row

* video item layout

* fix

---------

Co-authored-by: Levitating Pineapple <noreply@levitatingpineapple.com>
Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2024-07-23 18:11:42 +01:00
Arturs Krumins
859fa0bc22
ios: make image utilities accessible from extensions (#4438)
* ios: move image utils in to framework

* Rename UIImage convenience init
2024-07-11 13:56:55 +01:00
Arturs Krumins
5d7abf31ce
ios: make message corners rounded when selecting context menus (#4401)
Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2024-07-04 18:37:03 +01:00
Evgeny Poberezkin
f5eea018d9
ios: chat themes and wallpapers (#4376)
* ios: wallpapers (#4304)

* ios: wallpapers

* theme selection

* applied theme colors and preset wallpaper

* more places with background

* one more

* accent color

* defaults

* rename

* background

* no change to cell color

* unneeded

* changes

* no global tint

* defaults

* removed unneeded class

* for merging

* ios: wallpapers types (#4325)

* types and api

* divided types per target

* creating directory for wallpapers

* creating wallpaper dir at launch

* ios: wallpapers appearance (#4335)

* appearance

* changes

* refactor

* scale

* lambda to function

---------

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>

* ios: wallpapers user/chat overrides (#4345)

* ios: wallpapers user/chat overrides

* chat overrides

* color picker updates colors correctly

* fix state update

* labels

* background for light theme

* small optimization

* removed commented code

* ios: enhancements to wallpapers (#4361)

* ios: enhancements to wallpapers

* colors for background

* ios: wallpapers import/export (#4362)

* ios: wallpapers import/export

* comment

* ios: wallpapers theme updates (#4365)

* ios: wallpapers theme updates

* group member background

* colors

* profile picture colors

* unneeded

* optimizations, images, state fixes

* fixes

* no editing of title color

* rename Menus and alerts, refactor

* tint applying fix

* fixes

* migration of accent and themes

* fix updating system theme

* migration changes

* limiting color range

* ios: wallpapers rename enum (#4384)

* ios: wallpapers rename enum2 (#4385)

* ios: wallpapers rename enum2

* change

* colors were commented

* fix build and look

---------

Co-authored-by: Stanislav Dmitrenko <7953703+avently@users.noreply.github.com>
2024-07-03 22:42:13 +01:00
Evgeny Poberezkin
2585f4ecfd
ios: ChatView performance improvements (#4353)
* feat: Add synthesized hashable conformance to chat and API types (#4348)

* UIKit ReverseList

* ReverseList - manual layout updates for external state

* Propagate ScrollModel; Disable async media width

* Filter chat items

* Remove UIKit menu wrapper

* Make chat item width calculation synchronous (#4371)

* Fix floating button regression

* Improve filter performance

* Fix page load the merged items exceed full page

* Resolve iOS15 compabibility

* Restore build config

* Add page-up scroll; Fix same item decrementing unread counter multiple times

* Fix: Chat not loading additional pages, if newest items are all merged and exceed page size

* Minor

* Fix item loading regression

* Fix item loading regression 2

* Fix unread regression

* refactor

---------

Co-authored-by: Arturs Krumins <auth@levitatingpineapple.com>
Co-authored-by: Levitating Pineapple <noreply@levitatingpineapple.com>
Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
2024-07-03 10:24:26 +01:00
spaced4ndy
ec7b35adb9
ios: check known relays before file reception, support user approval of unknown relays (#4044)
* ios: check known relays before file reception, support user approval of unknown relays

* add privacyAskToApproveRelays to AppSettings

* less text

* ui improvements, fixes

* fix ntf

* shorter alert

* simplify settings

* rename

* icon

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2024-05-20 17:49:19 +04:00
spaced4ndy
4b13512950
ios: SMP proxy support (#4178)
* ios: SMP proxy support

* statuses

* group statuses

* error texts

* update

* change icon

* texts

* texts

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2024-05-15 13:09:42 +01:00
spaced4ndy
15a226cfd1
ui: limit length of member names in chat view (#4122) 2024-05-03 12:34:15 +01:00
Stanislav Dmitrenko
f6ceb89c4b
android, desktop: forward ui (#4039)
* android, desktop: forward ui

* changes

* attachment icon

* reorder lines

* reorder lines

* change

* inline content + formatted text

* fix header padding

* fix

* fix2

* Revert "fix header padding"

This reverts commit 63f2b15f02.

* broken default parameter

* changes

* more checks for file forwarding

* paddings

* padding

* padding and fix

---------

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
2024-04-19 17:36:32 +01:00
spaced4ndy
77f5c678d5
ios: forward ui (#4024)
* wip

* wip

* fixes

* improvements

* info

* fix

* dont cleanup file

* info design, text

* text

* rework with LazyVStack

* delay

* refactor

* move delay

* fix

* refactor

* refactor 2

* keep current message

* forward with quote, context icons

* info

* preserve draft

* remove newline

* improve search

* info

* layout

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2024-04-16 09:28:39 +01:00
spaced4ndy
29941729d2
ui: forwarded item header (#4017) 2024-04-12 12:56:09 +04:00
Stanislav Dmitrenko
5fde879fea
ios: better layout performance for chat item (#3911)
* ios: better layout performance for chat item

* different way of disabling menu

* two fixes

---------

Co-authored-by: Avently <avently@local>
Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2024-03-19 14:40:46 +00:00
spaced4ndy
7d2f6a3609
ios: block member for all (#3708)
* ios: block for all

* member info

* change conditions

* update ui

* blockedByAdmin

* fix

* rework

* fix, comment

* comment

* fix

* fix

* fixes for default

* fix text

* reorder

* fix

* fix

* secondary

* old buttons (revert this)

* blocked by admin text

* revise notification
2024-01-20 10:33:36 +00:00
Stanislav Dmitrenko
b5fe1f8364
ios: notes to self (#3690)
* ios: notes to self

* change

* icon

* changes

* no live message

* search

* alert

* better checks

* api change

* changes for review

* changes

* ios: align notes chat color with sent chat items frame color (#3704)

* changes

---------

Co-authored-by: Avently <avently@local>
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
2024-01-18 19:57:14 +04:00
Evgeny Poberezkin
809040c7bc
ui: show secrets on tap (#3628)
* ios: show secrets on tap

* android: show secrets on tap/click

* android: clickable links in group descriptions

* android: hide secrets one by one

* ios: clickable links in welcome message preview

* refactor

* refactor2
2023-12-30 18:57:10 +00:00
Evgeny Poberezkin
9e8084874f
ios: block members (#3248)
* ios: block members (WIP)

* CIBlocked, blocking api

* show item as blocked

* show blocked and merge multiple deleted items

* update block icons

* split sent and received deleted to two categories

* merge chat feature items, refactor CIMergedRange

* merge feature items, two profile images and names on merged items

* ensure range is withing chat items range

* merge group events

* fix/refactor

* make group member changes observable

* exclude some group events from merging

* fix states not updating and other fixes

* load list of members when tapping profile

* refactor

* fix incorrect merging of sent/received marked deleted

* fix incorrect expand/hide on single moderated items without content

* load members list when opening member via item

* comments

* fix member counting in case of name collision
2023-10-31 09:44:57 +00:00
Evgeny Poberezkin
748572ace9
ui: types and stubs to encrypt local files (#3003)
* ui: types and stubs to encrypt local files

* ios: encrypt automatically received images in local storage

* encrypt sent images, marked to be received via NSE

* ios: encrypt sent and received local voice files

* encrypt sent and received local files

* fix NSE

* remove comment

* decrypt files in background thread
2023-09-07 11:28:37 +01:00
spaced4ndy
b829bd0c06
ios: fix Speak Screen repeating messages (#2897)
* ios: fix Speak Screen repeating messages

* fix

* different modifier

---------

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
2023-08-17 23:05:19 +04:00
Evgeny Poberezkin
a5642928eb
ios: improve group layout (#2925)
* ios: improve group layout

* different font

* fix formatting

* returns

* localized strings

---------

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
2023-08-15 13:02:23 +01:00
spaced4ndy
c9400fe932
ios: group snd status (#2779) 2023-07-28 13:16:52 +04:00
Evgeny Poberezkin
9e33ba46af
ios: update api for message info, refactor, localize (#2458)
* update api for message info, refactor, localize

* refactor

* change text, layout

* show reactions on deleted revealed items

* update

* trim

* refactor

* corrections

---------

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
2023-05-19 20:50:48 +04:00
Evgeny Poberezkin
c06a970987
core: message reactions (#2429)
* core: message reactions

* remove comments

* core: commands to set reactions

* fix tests

* process reaction messages

* store functions

* include reactions on item updates

* remove print

* view, tests

* load reactions for new items

* test removing reaction

* remove spaces

* limit the number of different reactions on one item

* remove unique constraints

* fix permissions

* indexes

* check chat item content before adding reaction

* fix group reactions

* simpler index

---------

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
2023-05-15 11:28:53 +01:00
Stanislav Dmitrenko
0ec2468dce
ios: slider for voice messages (#2432)
* ios: slider for voice messages

* better layout hiding and showing

* properly stop playback when other media started

* better layout

* change padding

* code style

* refactor

---------

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
2023-05-14 18:07:34 +01:00
spaced4ndy
63f344bde6
ios: view edit history; core: prohibit item updates w/t changes (#2413)
* ios: view edit history; core: prohibit item updates w/t changes

* read more less wip

* Revert "read more less wip"

This reverts commit 8e0663377b.

* comment for translations
2023-05-09 20:43:21 +04:00
Stanislav Dmitrenko
afb0ae3d03
ios: video support (#2115)
* ios: video support

* made video experience prettier

* line reordering

* fix warning

* remove playback speed

* fullscreen player

* removed unused code

* fix conflict

* setting playing status better

* thumbnail dimensions and loading indicator

* fill under video

---------

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
2023-04-06 18:26:48 +01:00
Evgeny Poberezkin
f1a9814faa
ios: UI to moderate messages of other members (#1980)
* ios: UI to moderate messages of other members

* split moderate action

* do not show moderate button on moderated, show alert
2023-03-06 21:57:58 +00:00
JRoberts
3530022152
ios, android: moderated item content types, CIDeleted type (#1919) 2023-02-09 15:10:35 +04:00
Evgeny Poberezkin
e1740a8be4
ios: disappearing messages (#1614)
* ios: disappearing messages

* show ttl in meta if different

* mark messages as disappearing when read

* previews
2022-12-21 12:59:45 +00:00
Evgeny Poberezkin
9e847c2e1f
ios: live messages (#1569)
* ios: live messages

* remove comments

* remove conflict

* live message buttons and alert

* only send full words

* fix double sending

* typing indicator in live items

* add live parameter to API

* typing indication, pass live parameter to API

* refactor to support live messages with attachments

* disable attachments
2022-12-17 14:02:07 +00:00
Evgeny Poberezkin
e44e9a0940
mobile: broker error type (#1475)
* mobile: broker error type

* fix

* ios: update libraries

* change AgentErrorType to String
2022-12-03 18:05:32 +00:00
JRoberts
07ef6e4090
ios: marked deleted chat items, full deletion preference; android: types (#1473)
* ios: marked deleted chat items; full deletion preference

* text_, menu, backend

* android types

* more android types

* fix

* refactor ios

* restore previews

* box

* refactor menu

* revert unnecessary content.text changes

* Update apps/ios/Shared/Views/Chat/ChatItem/CIVoiceView.swift

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>

* revert layered framed items

* clever framed view

* improve look

* restore previews

* restore previews

* refactor

* refactoring, almost looks good

* look

* add previews

* more previews

* remove preview of legacy item

* ChatItemDeleted

* flip if

* remove text_

* refactor

* abstract pref property

* move marked deleted

* revert pref change

* undo menu

* fix - change to constants

* undo pref logic

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
2022-12-03 15:40:31 +04:00
JRoberts
a6e4e68bc5
ios: voice messages (#1389)
* experiments

* audio recording in swiftui

* recording encapsulated

* permission + playback

* stopAudioPlayback on cancel

* method names

* check permission in recording start

* run timer on main thread

* remove obsolete view

* don't call playback timer callback unless player is playing

* compose + send view + preview + send

* animation + improve state + quality

* fix recording not stopping in time

* animate to end

* remove recorder delegate, fix cancelling during recording

* replace print with log

* recording start error constructor

* CIVoiceView file

* chat item wip

* chat item wip

* refactor settings

* layout

* send correct duration

* item previews

* more background, animation

* more layout

* more layout, send button conditions

* context, preview, quote, notification texts

* chat item actions

* use isEmpty

* remove comment

* uncomment file.loaded

* more layout, hold to record

* more layout

* preview player stop on disappear

* more layout

* comment

* only one player or recording

* remove voice message on chat close

* fix state bug

* remove commented code

* length 30

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
2022-11-24 21:18:28 +04:00
Evgeny Poberezkin
02fa81e8aa
mobile: show unknown content with attached file as file item (for partial forward compatibility with voice and video messages) (#1394)
* mobile: show unknown content with attached file as file item (for partial forward compatibility with voice and video messages)

* fix

* android: show unknown files
2022-11-21 07:42:36 +00:00
Stanislav Dmitrenko
1f8bfbe3f5
android: Fixed conflics (#1225)
* ios: use transparent background for images without text and quote (#1224)

* android: Some small fixes (#1221)

* android: Some small fixes

* Alpha in preview image

* ImageView width limitation for portrait images

* Sharing files with a text

* Do not create new link on orientation change

* Skipping quoted item when applying transparent background

* Commented out sharing a text of image message

* Revert "ImageView width limitation for portrait images"

This reverts commit b1f20b51da.

* White color

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
2022-10-18 13:01:37 +01:00
Evgeny Poberezkin
4c8bc19182
ios: send multiple images (#1188)
* ios: send multiple images

* multi-select works (TODO race conditions)

* send multiple images, progress indicator in compose view

* scroll between fullscreen images, scroll to quoted item

* add swipe animation

* fix model state when sending the image

* fix sending multiple images

* use MainActor

* improve scrolling

* faster scroll

* improve scroll animation

* fix model updates
2022-10-10 13:40:30 +04:00
Evgeny Poberezkin
bbaa45a0e1
ios: fix layout for messages in right-to-left languages, #1032 (#1117)
* ios: fix layout for messages in right-to-left languages, #1032

* text alignment in compose message view

* more right-to-left alignment
2022-09-24 19:26:55 +01:00
JRoberts
5089dfdada
mobile: fix quote sender name interaction with incognito membership and alias (#1041) 2022-09-13 20:33:18 +04:00
Evgeny Poberezkin
fa844c48e9
ios: SimpleXChat framework to be shared by app/NSE (#714)
* ios: SimpleXChat framework to be shared by app/NSE

* remove bridging headers from pp/NSE

* embed & sign
2022-05-31 07:55:13 +01:00