Commit Graph

5454 Commits

Author SHA1 Message Date
Nora Trapp
a19737c0bb Tweak selection animations to be slide in / out 2021-03-16 19:48:59 -03:00
Nora Trapp
53d49f71b6 Block loads while animating selection change 2021-03-16 19:48:59 -03:00
Nora Trapp
70f6e62877 Animate quoted replies 2021-03-16 19:48:59 -03:00
Nora Trapp
39c851218d Animate multi-select UI appearance/disappearance 2021-03-16 19:48:59 -03:00
Nora Trapp
1f7a592166 Animate message send and receive. 2021-03-16 19:48:59 -03:00
Matthew Chen
6f737748e9 Avoid profile key conflicts. 2021-03-12 17:05:02 -08:00
Nora Trapp
d81849b7c8 Allow settings cells to span multiple lines, restyle disappearing messages cell 2021-03-10 12:15:03 -08:00
Nora Trapp
2472b46063 Add new delete account flow 2021-03-09 12:34:43 -08:00
Nora Trapp
67294588e4 more little tweaks 2021-03-09 12:30:31 -08:00
Nora Trapp
49c17f2af8 Add new delete account flow 2021-03-09 12:17:32 -08:00
Nora Trapp
0ec429ed3a Make sure settings views reload when changed by outside events 2021-03-09 12:17:31 -08:00
Jordan Rose
23a9c4518e MediaGallery: pin to the bottom when content insets change
If you're scrolled to the end, you probably want to stay scrolled to
the end rather than keep the same top position. This applies both when
the footer bar shows up (in multi-select mode) and when the scroll
view is initially loaded, fixing a bug where the bottom row is cut
off. Unfortunately, the latter fix does not seem to work on older
iOSs, but it doesn't make things worse either.
2021-03-06 10:34:52 -03:00
Jordan Rose
b46e03d759 MediaGallery: handle empty All media view correctly 2021-03-06 10:34:52 -03:00
Jordan Rose
22cb730164 MediaGallery: when loading the initial sections, we start at one end
...unless you clicked on an individual message to get into the
gallery. In the All Media case, we don't need to fetch later sections
because we started at the end.
2021-03-06 10:34:52 -03:00
Nora Trapp
49930139a0 little settings fixes 2021-03-05 23:01:20 -08:00
Jordan Rose
9ff7c2a33f MediaGallery: load later sections if all earlier sections are loaded
The collection view loads earlier sections if you're scrolled near the
top and later sections if you're scrolled near the bottom. However, if
there's only a page of loaded content, you can be near the top /and/
the bottom. Therefore, we need to potentially load later sections even
if you're at the top, because you might be at the beginning.
2021-03-05 10:17:04 -08:00
Nora Trapp
470e6afb26 Hide navbar background when scrolled to top 2021-03-05 09:07:00 -08:00
Matthew Chen
f359af8ae6 Revert "Hide navbar background when scrolled to top"
This reverts commit 734a26ad71.
2021-03-05 13:56:22 -03:00
Jordan Rose
5f4b97de5e MediaGallery: make our headers non-Gregorian-calendar-friendly
Some calendars have year numbers change in the middle of months; some
calendars occasionally reset the year number. Switch to a
DateInterval-based representation in GalleryDate to avoid these
pitfalls.
2021-03-05 09:08:09 -03:00
Jordan Rose
6b84ffb046 MediaGallery: fix bug in estimating database fetch size 2021-03-05 09:08:09 -03:00
Nora Trapp
2e1d2e1623 Show specific biometry type screen lock will use 2021-03-05 00:32:16 -08:00
Nora Trapp
734a26ad71 Hide navbar background when scrolled to top 2021-03-05 00:31:50 -08:00
Nora Trapp
91c8b4a250 Further design feedback 2021-03-04 18:32:24 -08:00
Nora Trapp
450870de44 Design feedback 2021-03-04 18:32:24 -08:00
Nora Trapp
b07745d60d Fix screen security switch 2021-03-04 18:32:24 -08:00
Jordan Rose
9cf01c3fd2 MediaGallery: fix multi-threading bug caught by previous commit! 2021-03-04 10:48:19 -08:00
Jordan Rose
a7a75d35e8 MediaGallery: final cleanups
- AssertIsOnMainThread
- prefer 'guard' for early exits
- lock down access control
- doc comment for the class itself
2021-03-04 10:30:54 -08:00
Jordan Rose
15a4a1a9cd MediaGallery: delete old Finder API, including its Yap implementation 2021-03-04 10:30:54 -08:00
Jordan Rose
46c7ed9ebe MediaGallery: use named constants for all batch sizes 2021-03-04 10:30:54 -08:00
Jordan Rose
c81ceaaeeb MediaGallery: add back the "substantial requests only" check
This avoids repeated database accesses for ranges that are mostly
loaded already.

Also, don't rebuild items that are already loaded, since overlapping
ranges are still expected in this design.
2021-03-04 10:30:54 -08:00
Jordan Rose
4e2fe8ca69 MediaGallery: avoid full searches in favor of per-section searches
Also, share more infrastructure with the tile view.
2021-03-04 10:30:54 -08:00
Jordan Rose
34d2ed47f1 MediaGallery: handle new messages coming in by reloading
The tile view will only reload the sections that changed. The page
view will reload its current item. This is necessary to keep the
MediaGallery model in sync with the database, but as a side benefit it
also means the All Media view gets live updates as new messages come
in.
2021-03-04 10:30:54 -08:00
Jordan Rose
3b90f1b761 MediaGallery: Filter recently-deleted items from database queries
And rewrite and simplify the rest of deletion logic appropriately.
(Thanks to Nora for the strategy.)

There is one tough case here: database updates have happened
/externally/ (say, from a disappearing message expiring), in which
case the database will be updated but the MediaGallery model will not.
In this case we've broken the invariant that we have the correct count
for each month-section, and need to put a hold on database access
until the model has been updated. The only effect of this is in the
page-based media VC, where we'll exit out of the browser rather than
advancing to the next item if the item we were looking at was deleted
/and/ the next item hasn't been loaded yet. (This can happen if you're
at the start of a message with many items and the whole message gets
deleted.)
2021-03-04 10:30:54 -08:00
Jordan Rose
15e92998cb MediaGallery: use OrderedDictionary as the backing store
...rather than a flat list of loaded MediaGalleryItems. This is
similar to the ad hoc approach in MediaTileViewController in the
previous commit, but is consistent across MediaPageViewController as
well.

Still not handled yet: deletions, also avoiding redundant database
access
2021-03-04 10:30:54 -08:00
Jordan Rose
29a2884743 Rewrite the All Media collection view controller
- Measure an entire section all at once, so items don't jump around
- Load individual items lazily by section instead of by plain index
- Search for more sections by enumerating timestamps

Does not handle deletes yet. Also I haven't removed all the old APIs.
2021-03-04 10:30:54 -08:00
Jordan Rose
76b716462e SSK: Make OrderedDictionary a struct and improve it a bit
- Now a struct, meaning no need for a clone() method
- Now a RandomAccessCollection indexed by Int
- Removed the subscript setter that EarlyMessageManager was using to
  make the reordering behavior more explicit
- Generalized insert(key:value:isAppend:) to insert(key:at:value:)
- Added removeSubrange(_:)
2021-03-04 10:30:54 -08:00
Nora Trapp
0cefe0abe6 Resolve merge conflicts 2021-03-03 20:49:07 -08:00
Nora Trapp
28a17ec257 Add internal settings view 2021-03-03 20:32:36 -08:00
Nora Trapp
5f1435113e Re-style privacy settings, group creation, compose, and other miscellany 2021-03-03 20:32:36 -08:00
Nora Trapp
80e188b46d Present profile subviews in modal 2021-03-03 20:29:41 -08:00
Nora Trapp
87720bc22d Notification settings restyle 2021-03-03 20:29:41 -08:00
Nora Trapp
19cb5dc27b Add chats settings 2021-03-03 20:29:41 -08:00
Nora Trapp
d3b708d97a Fix empty bio navbar 2021-03-03 20:29:40 -08:00
Nora Trapp
d1845e753d Update wallpaper stylings 2021-03-03 20:29:40 -08:00
Nora Trapp
9029a8c5cd Add account settings 2021-03-03 20:29:40 -08:00
Nora Trapp
88d7821b60 Update profile settings view styles 2021-03-03 20:29:40 -08:00
Nora Trapp
9c74b6050b Add logging and about to help settings 2021-03-03 20:29:40 -08:00
Nora Trapp
6541230c89 Enable theme settings for pre iOS 13 2021-03-03 20:29:40 -08:00
Nora Trapp
232bb2f8af Change over a bunch of tables and design feedback 2021-03-03 20:29:40 -08:00
Nora Trapp
325f87a1cb Initial App settings restyling 2021-03-03 20:29:40 -08:00