Commit Graph

54 Commits

Author SHA1 Message Date
Harry
a146e18aaf
Set up account state and exit registration
* Go to chat list view after registration

* sync system contacts during registration

* Use explicit local credentials for storage service operations during registration

* fix tests

* Quick hack to get through double pin confirmation

* Finishing touches

* lint

* fix build

* reload phone number discoverability after storage service sync

* fix tests again

* Take chat auth on account and contact record initializers

* Change around branches for clarity in OWSUserProfile

* pr comments

* Split ChatServiceAuth into the same and AuthedAccount

* fix tests

* merge woes
2023-03-09 21:54:51 -08:00
Harry
003cc19e62
Update SignalCoreKit. Use explicit DispatchQueue instead of relying on the implicit type on promise 'on' params
* Use explicit DispatchQueue instead of relying on the implicit type on promise 'on' params

* Update SignalCoreKit
2023-02-07 16:14:39 -08:00
Max Radermacher
103f9ed8b8 Fix typo: Convsersation → Conversation 2022-12-30 09:18:49 -06:00
Harry
f7124e84e2
Update sharesheet error sheet copy when failing to send only to stories 2022-11-16 13:09:32 -08:00
Harry
5824871af9
Share sheet: allow sharing to story before processing completes 2022-11-16 10:28:06 -06:00
Harry
1be2c1489b
Require explicitly setting my story privacy settings before sending to my story
* Update checkmark icons (for selection rows only)

* Use selected/unselected checkmarks on my story privacy settings

* Initially show no setting on my stories privacy. Require setting to select My Story in recipient picker

* Clear my story privacy settings from debug ui

* design request: keep the all connections view button if unselected

* Same size for story privacy rows with and without detail text
2022-11-11 13:28:14 -08:00
Harry
520faa95df
Refactor OWSNavigationController
* make shouldCancelNavigationBack a var

* rename OWSNavigationView->OWSNavigationChildController

* forward delegate calls to OWSNavigationController

* apply theme and style to OWSNavigationBar consistently

fix themeing on gif picker controller

* Use topPinned navbar position. Size the blur effect view using the background view

* Use fade animation when hiding the navigation bar

* fix issues with reduced transparency setting

* pr feedback
2022-11-03 16:40:47 -07:00
Harry
c745f9a6ae
Refactor OWSViewController
* Remove the useless shouldUseTheme

* Remove the useless shouldBottomViewReserveSpaceForKeyboard

* Add ViewControllerLifecycle

* Use more sensible constraints for keyboard layouts

* Consistent theme updates. themeDidChange is what you subclass, applyTheme is each class' internal application of theme changes, if needed

* Add app lifecycle hooks

* pr feedback

* pass through touches on the keyboard layout view(s)

* fix lint
2022-11-03 13:12:13 -07:00
Harry
2b6d1da564
Un-index deleted private story threads. Omit disabled private story threads from search results
* Un-index deleted private story threads. Omit disabled private story threads from search results

* Fix bad debug assert on empty picker search results

* remove extra didRemove FTS check
2022-11-02 11:18:55 -07:00
Harry
87db4ab0aa
Better multisend of text stories
* Shuffle code around, adding UnsentTextAttachment

* Replace usages of TextAttachment with UnsentTextAttachment where applicable, creating an actual TextAttachment (and associated OWSlinkPreview image TSAttachment, if applicable) only per-recipient

* Only upload one text story link preview image attachment and propagate it to the individual TSAttachments created for each destination

* update comments so I don't lose my mind the next time I read this code

* Dedupe text stories sent to the same person via multiple private threads

* fix non-compiling tests

* pr feedback
2022-10-20 11:04:25 -07:00
Harry
df51a9f837
Story-related conversation picker fixes
* apply theme to cells when conversation picker theme changes

* Retain selection UI when reloading conversation picker cells

* Prioritize newly created story threads for conversation picker sort ordering

* Index private story threads for searching

* Add story search results to conversation picker and fix issues with reloading with stuff pre-selected

* PR feedback 1: efficient thread migration

* PR feedback 2: don't allow expansion of story search results
2022-10-18 16:14:16 -07:00
Nora Trapp
8c633c718e Private Story -> Custom Story 2022-10-18 15:41:04 -07:00
Evan Hahn
370ff654e7
Change license to AGPL
Change license to AGPL

This commit:

- Updates the `LICENSE` file

- Start every file with something like:

      // Copyright YEAR_FIRST_PUBLISHED Signal Messenger, LLC
      // SPDX-License-Identifier: AGPL-3.0-only

---

First, I removed existing license headers with this Ruby 3.1.2 script:

    require 'set'

    EXTENSIONS_TO_CHECK = Set['.h', '.hpp', '.cpp', '.m', '.mm', '.pch', '.swift']

    same = 0
    different = 0

    all_files = `git ls-files`.lines.map { |line| line.strip }
    all_files.each do |relative_path|
      if relative_path == 'Pods'
        next
      end

      unless EXTENSIONS_TO_CHECK.include? File.extname(relative_path)
        next
      end

      path = File.expand_path(relative_path)

      contents = File.read(path)
      new_contents = contents.sub(/\/\/\n\/\/  Copyright .*\n\/\/\n\n/, '')

      if contents == new_contents
        same += 1
      else
        different += 1
      end

      File.write(path, new_contents)
    end

    puts "updated #{different} file(s), left #{same} untouched"

I'm sure this script could be improved, but it worked well enough.

Then, I created `Scripts/lint/lint-license-headers` and ran it to auto-
fix a lot of files. This changed the mode of some files, but I think
that's actually desirable. For example,
`SignalServiceKit/src/Util/AppContext.m` previously had a mode of
`0755/-rwxr-xr-x`, and it's now `0644/-rw-r--r--`.

Then I fixed some stragglers and updated the precommit script.

See [a similar change in the Desktop app][0].

[0]: 8bfaf598af
2022-10-13 08:25:37 -05:00
Harry
9d4fb97dfd
Add story media previews to conversation picker in story send flow
* Support scale aspect fill in MediaMessageView

* show image/video previews on conversation picker when in stories only send flow

* show text story previews in conversation picker

* fix media preview border color

* update rotation for RTL

* PR feedback
2022-10-12 09:59:49 -07:00
Harry
e4316d3a39
A bunch of story fixes
* Hide story video duration tooltip when changing selection

* update story row swipe action title font

* Update tab bar icons

* Fix ghost safe area shown when cancelling an interactive dismiss of a chat view

* Use forced dark theme background color for cell selection in story info sheet

* Exclude hidden story contexts from conversation picker

* remove unused asset

* pr feedback
2022-10-12 09:54:50 -07:00
Harry
3f0fe34089
Disable view once media in stories send flow
* Disable view once media in stories send flow

* Remove stories from picker if sending a view once media

* dont show view once button if sending to stories from sharesheet
2022-10-11 13:11:48 -07:00
Nora Trapp
ba90b3989d Fix the number of stories rendered on conversation picker 2022-10-03 21:35:32 -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
Harry
da06c1357c
Show my story privacy settings the first time you send to my story
* Add first send story privacy field to AccountRecord proto

* Store hasSetMyStoriesPrivacyKey on StoryManager

* sync hasSetMyStoriesPrivacy state

* Reuse MyStorySettingsViewController in a sheet view controller

* Show my story privacy settings from conversation picker if unset when selecting my story destination

* reload my story row to change subtitle

* pr feedback
2022-09-27 10:06:01 -07:00
Nora Trapp
96d8abac67 PR Feedback 2022-09-22 14:53:29 -07:00
Nora Trapp
c8dc629351 Show active group stories in the conversation picker 2022-09-22 14:53:29 -07:00
Harry
ae4837e600
Segment story videos longer than 30s
* initial approach commit, needs cleanup

* Keep >30s videos for non-story recipients, but split for stories

* Some cleanup

* fix too many chats toast offset

* show tooltip in the send flow

* pr feedback
2022-09-16 15:29:44 -07:00
Nora Trapp
6dc57c6eb0 Don't allow sending stories to groups you are no longer a member of 2022-09-12 10:38:47 -07:00
Nora Trapp
9bd91f66b6 Allow turning off stories 2022-09-12 10:14:09 -07:00
Nora Trapp
95ddec00b5 Redesigned story privacy settings 2022-09-12 10:14:09 -07:00
Nora Trapp
66c25a4afd Batch update identity keys and present safety number sheet on camera first and sharing flows 2022-09-08 09:42:43 -07:00
Nora Trapp
92d5207158 Batch lookup safety number changes when selecting conversations from conversation picker 2022-09-08 09:42:43 -07:00
Nora Trapp
09598d2e7a Add remote flag for stories 2022-08-31 13:34:24 -07:00
Nora Trapp
b420ad1f95 Cleanup AttachmentMultisend 2022-08-19 14:23:59 -07:00
Jordan Rose
0f694d318c Allow ToastController to present from the top as well 2022-08-17 17:59:19 -07:00
Nora Trapp
c2d9787cf7 PR Feedback 2022-07-15 15:05:03 -07:00
Nora Trapp
b82cd6c654 Add ability to send to group stories 2022-07-15 15:05:03 -07:00
Nora Trapp
0dae510d07 Add '+ New Story' button to conversation picker 2022-07-15 15:05:03 -07:00
Evan Hahn
576d854c6f Remove unnecessary break statements
This fixes all of our violations of [SwiftLint's
`unneeded_break_in_switch` rule][0].

[0]: https://realm.github.io/SwiftLint/unneeded_break_in_switch.html
2022-06-24 09:32:34 -07:00
Nora Trapp
7bd167f815
Initial story sending support
* Little fix for context menu

* Add 'My Stories' section to stories tab

* Add new story thread types

* Show stories in conversation picker

* Support for sending stories

* Update story list when sending stories

* Add basic 'My Stories' view controller

* Initial stories settings screens

* Consolidate TSPrivateStoryThread and TSMyStoryThread into one class

* Require an explicit read transaction to initialize an outgoing message

* Fix linting

* Allow enabling group story from internal settings

* Fix tests

* PR Feedback
2022-06-10 22:28:03 -04:00
Evan Hahn
29c0ddf60e Fix violations of SwiftLint's attributes rule
_I recommend reviewing this with whitespace changes disabled._

Most of these were `@objc` being on the same line, which I fixed with [a
silly script][1]—probably could've used `sed` if I were wiser. The rest
were manual fixes.

See [the SwiftLint documentation for this rule][0].

[0]: https://realm.github.io/SwiftLint/attributes.html
[1]: https://gist.github.com/EvanHahn-Signal/d353c93fa269c82b96baca0a1086521f
2022-05-14 09:07:42 -05:00
Martin Böttcher
54b743de2d
moved older stringsdict changes into new branch; minor changes (#4205)
moved older stringsdict changes into new branch
2022-04-28 17:41:43 +02:00
Michelle Linington
dd0a7f6b80 Require transaction to check blocked address state 2022-04-08 19:01:43 -07:00
Michelle Linington
739af9372a Require transaction to check blocked thread state 2022-04-08 19:01:43 -07:00
Igor Solomennikov
95d6a96824 Update checkmark in chat picker from media sharing flow to match other views.
ConversationPicker shared checkmark asset with media editor toolbar. The
checkmark was a little bit too small, also checked and unchecked indicators
had different size.

This commit updates ConversationPicker to use the same checkmark styling
that group UI has.
2022-03-29 10:12:29 -07:00
Igor Solomennikov
007415832e Disable Send/Proceed button if no chats are selected. 2022-03-22 10:56:46 -07:00
Martin Böttcher
000c4c282b Merge branch 'master' into martin/IOS-2234 2022-03-17 09:09:37 +01:00
Nora Trapp
52a3182f13 Render story rings on avatars 2022-03-16 17:52:43 -07:00
Martin Böttcher
8f9be31ba3 replaced NSLocalizedStringFromAppBundle with OWSLocalizedString 2022-03-08 10:17:25 +01:00
Martin Böttcher
c0adfbfb32 NSLocalizedString is replaced by NSLocalizedStringFromAppBundle (reading strings from the bundle of the main app) for all source files called by an app extension and the localizable files are removed for the app extension targets. 2022-03-07 13:29:06 +01:00
Jordan Rose
058a0213b7 Check whether you're blocked in a thread without a write transaction
In most cases when working with a ConversationItem we already have a
write transaction, but sometimes we don't. In this case, we know you
can only be blocked in a conversation if there's history in it (at
least as far as the local device knows), and so we can ignore any
threads that don't exist.
2022-02-18 14:00:27 -08:00
Nora Trapp
7ecb98e935 PR Feedback 2021-11-10 11:16:52 -08:00
Nora Trapp
ba8154ff7b Fix conversation picker search bar styling 2021-11-10 11:10:18 -08:00
Michelle Linington
6105ee5a20 Better naming of size classes
Also fixes bug with EmojiReactorCell layout
2021-11-09 14:25:55 -08:00
Michelle Linington
dea35199b2 Clean up ConversationAvatarView data sources
Creates a special data source enum for ConversationAvatarView data
providers. Before, ContactCell and ConversationAvatarView used the data
source, neither applying to each perfectly
2021-11-09 14:25:55 -08:00