Commit Graph

29 Commits

Author SHA1 Message Date
Harry
2ac759408a
[MOB] Payment messages in chat 2023-08-24 13:55:39 -07:00
Sasha Weiss
84957f66eb
Clean up InteractionFinder 2023-08-21 18:08:10 -07:00
Sasha Weiss
06e1a416cc
Remove the "Any...Finder" pattern from a bunch of types 2023-08-21 10:27:07 -07:00
Max Radermacher
ca3b018734
Add & use DisappearingMessagesConfigurationStore 2023-06-05 11:00:38 -05:00
Max Radermacher
0681121776
Introduce ConversationViewModel 2023-05-24 09:46:11 -07:00
Igor Solomennikov
c054f3de91
Remove unnecessary "@objc" in SignalUI. 2023-05-16 16:39:19 -07:00
Harry
c8da382654
Handle text formatting styles in conversation list snippets 2023-05-03 22:04:05 -07:00
Harry
b3700d07ce
Refactor mention/style/search result attribute application 2023-05-01 13:57:07 -07:00
Harry
224e5a7c6b
Parse text formatting styles in MessageBody
* add deserialization test for MessageBodyRanges

* Add style ranges to MessageBodyText

* add deserialization tests and fix small other test

* add basic mention hydration tests

* Add RTL support for @mention hydration

* Add a test with accents for unicode shenanigans

* unique-ify TODOs

* Add emoji test and fix implementation to account for multi-point unicode that is captured in NSString.length but not String.count

* Add more TODOs for text formatting

* Collapse style ranges on init

* Handle mention overlaps on MessageBodyRanges init

* add tests, update existing tests, fix bugs

* Update v2 deserialization test; the meaning of Style raw values has changed

* comment nit
2023-04-04 12:46:09 -07:00
Max Radermacher
93d97da82b
Split “in progress” & “saved” voice message drafts 2023-03-08 15:31:56 -08:00
Evan Hahn
f2c218edca
Use new copy for in-chat gift messages
This required plumbing the other person's "short name", which is the
most significant code change.
2023-01-11 14:18:48 -06:00
Harry
075133be72
Observe story viewed ring changes in ConversationAvatarView
* Observe story viewed ring changes in ConversationAvatarView itself

* Manage ConversationAvatarView's story observation based on the context

* remove story state from thread view model, now unused

* pr feedback renames
2022-10-25 12:57:52 -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
Nora Trapp
565ffe4f5a Don't show story ring on note-to-self 2022-09-12 11:23:23 -07:00
Evan Hahn
6737d09e22
ThreadViewModel no longer needs Objective-C interoperability
The last Objective-C reference to `ThreadViewModel` was removed in
793101f0e4, so we can remove a bunch of
`@objc` annotations.
2022-08-31 15:51:25 -07:00
Evan Hahn
48c3c08c10 Fix vertical_parameter_alignment SwiftLint violations
This fixes violations of [SwiftLint's `vertical_parameter_alignment`
rule][0]. This should have no user impact.

[0]: https://realm.github.io/SwiftLint/vertical_parameter_alignment.html
2022-08-18 10:37:09 -05:00
Nora Trapp
7a84d7605b Allow viewing your own sent stories 2022-08-01 12:44:31 -07: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
Michelle Linington
739af9372a Require transaction to check blocked thread state 2022-04-08 19:01:43 -07:00
Nora Trapp
78eb06a812 Update story list sorting to match spec 2022-03-31 00:40:47 -07:00
Martin Böttcher
000c4c282b Merge branch 'master' into martin/IOS-2234 2022-03-17 09:09:37 +01:00
Nora Trapp
6810c76062 Switch StoryFinder to SDSAny transactions 2022-03-16 17:54:40 -07:00
Nora Trapp
a656c91fcf Store the timestamp when a story was viewed 2022-03-16 17:53:28 -07:00
Nora Trapp
52a3182f13 Render story rings on avatars 2022-03-16 17:52:43 -07:00
Nora Trapp
99350fb38c Rename HomeViewController to ChatListViewController 2022-03-16 17:51:51 -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
Matthew Chen
25f015d8bc Add SignalUI framework target. 2021-10-19 09:39:53 -03:00
Matthew Chen
c416609108 Add SignalUI framework target. 2021-10-19 09:39:53 -03:00