Commit Graph

29312 Commits

Author SHA1 Message Date
Sasha Weiss
f39a8bacb2
Use attributed string formatting in CVComponentThreadDetails 2022-10-05 08:58:06 -07:00
Sasha Weiss
b00ef40076
Use attributed string format in ChatListViewController 2022-10-05 08:57:17 -07:00
Sasha Weiss
a057bde7e8
Reuse NSAttributedString formatting for MessageRequestView 2022-10-05 08:54:50 -07:00
Evan Hahn
160d46ef77
Fix debug assert when proto message has no addresses
This restores the behavior prior to
4a0141be41, where I made a mistake that
affect development builds.

Previously, the generated code looked like this, to prevent
instantiation of `SignalServiceAddress`es with no identifiers:

    // This is a sketch!
    let address: SignalServiceAddress? = {
      guard hasUuid || hasE164 else { return nil }
      let address = SignalServiceAddress(uuid: uuid, e164: e164)
      guard address.isValid else {
        owsFailDebug("address was unexpectedly invalid")
        return nil
      }
      return address
    }()

It makes sense (to me) to do this, because all proto fields are
optional. That means you can have a valid message that lacks both of
these fields, which is allowed. It shouldn't error.

However, I changed it to the equivalent of this, which caused an error
in `SignalServiceAddress`'s initializer:

    let address: SignalServiceAddress? = {
      let address = SignalServiceAddress(uuid: uuid, e164: e164)
      guard address.isValid else {
        return nil
      }
      return address
    }()

This reverts that to avoid the debug assertion failure. I don't think
this ever affected "real" builds beyond some extra logging.
2022-10-05 07:31:59 -07:00
Evan Hahn
56589799cb
Clean up registration ID generation
_This change should have no user impact._

This cleans up the way we generate registration IDs. It:

- Rewrites the generation code in Swift
- Removes the "sneaky transaction" method. I did this for clarity, and
  because we won't use it for much longer
- Turns a log warning into a regular log—generating a registration ID is
  not a problem
- Adds tests

I think this is a useful change on its own, but will be handy for an
upcoming change, too.
2022-10-05 14:09:07 +00:00
Max Radermacher
6cede8f5ec Remove unnecessary String/NSString bridging 2022-10-05 11:11:48 +00:00
Nora Trapp
8c08e74ef5 "Bump build to 5.57.0.4." (nightly-10-05-2022) 2022-10-05 04:00:59 -07:00
Max Radermacher
0afb536aa1 Add Malay InfoPlist.strings files to the project 2022-10-05 10:52:54 +00:00
Evan Hahn
09a279e55d Swiftify fake message sender
This should only affect tests.

This was a pretty mechanical conversion. I removed some unused variables
while I was here, too.
2022-10-05 10:50:53 +00:00
Harry
bb0005d82c
tweak tab bar disappear animation
* tweak tab bar disappear animation

* Force UIToolbar to update its safe area when hiding uitabbar
2022-10-04 21:52:36 -07:00
Harry
9cc152e052
Update trailing swipe gesture for story replies/views
* Update trailing swipe gesture for story replies/views

* pr feedback
2022-10-04 16:47:30 -07:00
Harry
29fbb192d5
Add my story privacy settings learn more
* Add my story privacy settings learn more

* light fixes for boost sheet

* PR feedback

* audit usages of InteractiveSheetViewController
2022-10-04 15:11:16 -07:00
Evan Hahn
b5e64e9fce Speed up link preview search code
Previously, we collected all URL matches and then searched through them.
Now, we search lazily, which should improve performance.

I added a perf test that repeats a URL a million times. The new code
finishes in ~0.001 seconds on my machine. The old code does not finish.
2022-10-04 14:09:00 -07:00
Evan Hahn
a066511a62 Remove useless test setup/teardown
We had a lot of functions like this, which are useless:

    override func setUp() {
        super.setUp()
    }

This removes them.
2022-10-04 14:06:34 -07:00
Sasha Weiss
814f6c1bf2
Skip inactive experience IDs, and opportunistically clear unknown ones 2022-10-04 12:22:24 -07:00
Max Radermacher
f87374dac4 Remove old Transifex files
These haven’t been touched in 8 years, so it seems like we probably
don’t need them, and we definitely won’t need them after moving to
Smartling.
2022-10-04 12:00:43 -07:00
Harry
6a88e6c967
Revert "Remove pre-Xcode 14 status bar workarounds"
This reverts commit 9f731edae9.
2022-10-04 09:17:33 -07:00
Sasha Weiss
7fb1da0cec
Migrate ExperienceUpgrade models to SDSCodableModel 2022-10-04 08:52:03 -07:00
Nora Trapp
a15cb0b063 "Bump build to 5.57.0.3." (nightly-10-04-2022) 2022-10-04 04:00:57 -07:00
Nora Trapp
49ed068fcd Allow sharing text to stories 2022-10-03 21:35:32 -07:00
Nora Trapp
34bc3fc919 Allow forwarding text stories 2022-10-03 21:35:32 -07:00
Nora Trapp
b9842b5eb2 Allow forwarding to stories 2022-10-03 21:35:32 -07:00
Nora Trapp
1c4772ebe0 Fix truncation of 'Tap to add to a story' 2022-10-03 21:35:32 -07:00
Nora Trapp
ba90b3989d Fix the number of stories rendered on conversation picker 2022-10-03 21:35:32 -07:00
Nora Trapp
8f8ec0c249 Show red X when picking contacts to exclude 2022-10-03 21:35:32 -07:00
Nora Trapp
3d6f88fa0b Update story subtitle label colors 2022-10-03 21:35:32 -07:00
Nora Trapp
1645e76c2b Fix disabling stories from 'My Stories' view 2022-10-03 21:35:32 -07:00
Nora Trapp
3c2096ad71 fix reversal of photo and story view buttons 2022-10-03 21:35:32 -07:00
Nora Trapp
5f3b5e841c Delete stories sent to a private list when it's deleted 2022-10-03 21:35:32 -07:00
Nora Trapp
6eca0a0ef2 Remotely delete all sent stories when deactivating stories 2022-10-03 21:35:32 -07:00
Nora Trapp
1b243581db Update '+ New Story' Button 2022-10-03 21:35:32 -07:00
Harry
4100ee177b
Fix story video flickering due to excessive StoryItemMediaView recreation.
* Fix story video flickering due to excessive StoryItemMediaView recreation.

* remove debug assert if no attacgment found on dismiss, only affects debug builds but can happen if deleting while in the viewer

* fix text color for replies button on iOS 13

* pr feedback

* always set caption even if nil
2022-10-03 21:26:50 -07:00
Harry
74228f424e
Add StoryContextAssociatedData to compute story tab badge count without hidden stories
* Add StoryContextAssociatedData and db migrations

* Remove hideStory from ThreadAssociatedData

* Remove lastViewedStoryTimestamp and lastReceivedStoryTimestamp from TSThread

* drop deprecated columns in db migration

* add indexes

* dump schema.sql

* Update unviewed stories SQL query

* fix thread fetching for incoming story messages

* reload story tab badge when StoryContextAssociatedData changes

* Add test for TSGroupModel backwards-compatible deserialization

* move db migration

* Only use StoryContextAssociatedData for story badge count

* update StoryContextAssociatedData lastReceivedTime when a story message is deleted

* catch group threads for outgoing story messages too

* clean up sql query

* Only update lastReceievedStoryTimestamp for remote deletions

* add latestUnexpiredTimestamp to StoryContextAssociatedData
2022-10-03 21:16:01 -07:00
Evan Hahn
4a0141be41
Omit E164 from outgoing envelopes
[Android][0] and [Desktop][1] have already removed this field. This
follows suit.

The highlights:

- `SignalService.proto` removes some fields by making them `reserved`
- `ProtoWrappers.py` updates our code generation to support addresses
  that only have a UUID (previously, you needed both a UUID and E164
  field)
- Most everything else is removing E164s

[0]: 9c266e7995
[1]: 2b0d3cab40
2022-10-03 23:55:39 +00:00
Evan Hahn
56f8548436 Remove old test utility file
This removes `TestUtil.h`.

The `test` macro was the only thing used from this file and it was
identical to `XCTAssert`.
2022-10-03 22:58:02 +00:00
Harry
9f731edae9
Remove pre-Xcode 14 status bar workarounds 2022-10-03 15:29:49 -05:00
Evan Hahn
d3ec8f1fd1 Remove unused arguments from proto wrapper script
`--add-description` and `--skip-address-helpers` are unused in the
project. This removes them, along with some commented-out arguments.
2022-10-03 19:43:37 +00:00
Harry
cd0966821c
Allow context menu action text to apply text color
* Allow context menu action text to apply text color

* only remove vibrancy effect if actually using context menu text colors
2022-10-03 11:51:32 -07:00
Harry
e7b8f098dd
Increase story video max length to 30.999 seconds for android compatibility 2022-10-03 11:44:49 -07:00
Nora Trapp
00d83257e9 "Bump build to 5.57.0.2." (nightly-10-01-2022) 2022-10-01 04:00:47 -07:00
Igor Solomennikov
28faf6e0ae
Use "compact" layout for link preview panel when no image. 2022-09-30 12:27:33 -07:00
Nora Trapp
ba91920040 "Bump build to 5.57.0.1." (nightly-09-30-2022) 2022-09-30 04:00:45 -07:00
Nora Trapp
55aea652ee Make sure we create a contact thread for any received private story 2022-09-29 16:48:39 -07:00
Max Radermacher
02ca8e2a99
Include http headers on web socket connections
Once initialized, a URLSession’s configuration can’t be changed. In
order to transfer the headers, assign them to the configuration before
assigning the configuration to the session.
2022-09-29 16:36:42 -07:00
sashaweiss-signal
487405ef08 "Bump build to 5.57.0.0." (nightly-09-29-2022) 2022-09-29 16:28:51 -07:00
Max Radermacher
c210a00e53 Update release notes 2022-09-29 16:17:38 -07:00
Max Radermacher
5bffed3e22 Sync translations with Smartling 2022-09-29 16:17:38 -07:00
Max Radermacher
39135003a4 Fetch translations from Smartling
Smartling exposes a simple REST API that’s fairly easy to adopt.

Some differences from the old approach:

- We get UTF-8 back instead of UTF-16, so there’s no need to use iconv.

- We don’t support “nb_NO”, so we don’t need to remove it each time we
  fetch translations.

- We get back English fallbacks for .stringsdict files, so there’s no
  need to merge them manually ourselves.

- We no longer support country-specific locales *and* the root language,
  so we don’t need to merge, for example, “es” into “es-MX”.

- We handle language mapping & duplication inside the Swift script,
  which will hopefully be more reliable than cp’ing directories.
2022-09-29 16:13:06 -07:00
Max Radermacher
ef1f2fcb33 Temporarily remove the “yue” localization 2022-09-29 16:13:06 -07:00
Max Radermacher
0db3fb8106 Remove unsupported localizations
Also, clean up “Known Regions” in Xcode.
2022-09-29 16:13:06 -07:00