Commit Graph

68 Commits

Author SHA1 Message Date
Evan Hahn
14237a873f
NSLocalizedString -> OWSLocalizedString 2023-04-25 13:28:46 -05:00
Igor Solomennikov
6dd3d9a6f2
Convert all convenience methods in UIFont+OWS to Swift. 2023-04-18 17:14:51 -07:00
Max Radermacher
6a1ec67662 Remove readThrows method
It’s not necessary -- the same functionality can be implemented with the
normal `read` method.
2022-11-29 14:46:40 -08: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 Sanabria
d64a850be0 Fix native context menu icon sizes 2022-10-07 07:49:41 -07:00
Jordan Rose
1689aec8c6 Don't linkify a truncated URL until the user expands the message body
This is implemented by seeing if a data-detected item is at the very
end of a truncated string, in which case it isn't trusted to be
complete. This applies not only to URLs, but to other data-detected
items as well like emails and addresses. It's also specific to
truncated text since a user could very well type an ellipsis in their
actual message, and *that* shouldn't prevent linkification.

It's possible that an item at the very end of a truncated string *is*
complete (i.e. the truncation point was just *after* the URL), but we
can't be sure without comparing to the full text or storing additional
information, and that's trickier for a number of reasons. The user can
still expand the message and get the linkification in this case.
2022-05-06 10:56:45 -07:00
Matthew Chen
9271f83624 Remove databaseChangesWillUpdate. 2021-09-08 21:41:13 -03:00
Matthew Chen
492cd68a75 Fix message forwarding issues. 2021-08-25 11:04:13 -03:00
Matthew Chen
2a34d9131a Fix message forwarding issues. 2021-08-25 11:04:13 -03:00
Matthew Chen
55e8ce933d Respond to CR, ensure more views respond to theme changes. 2021-08-24 10:43:41 -03:00
Matthew Chen
23b857ae4a Use InteractiveSheetViewController. 2021-08-19 17:07:15 -03:00
Matthew Chen
a7060a2d69 Respond to CR. 2021-08-19 16:58:04 -03:00
Matthew Chen
c46a28bae5 Show success toast. 2021-08-19 16:58:03 -03:00
Matthew Chen
06b33325e8 Modify forward flow to support multi-forward. 2021-08-19 16:57:30 -03:00
Matthew Chen
623a891783 Modify forward flow to support multi-forward. 2021-08-19 16:57:28 -03:00
Matthew Chen
12dc3775d6 Modify forward flow multi-forward. 2021-08-19 16:57:01 -03:00
Matthew Chen
f2b76e60f9 Refine names. 2021-07-02 22:08:53 -03:00
Matthew Chen
f06b72bc2a Remove uiRead(). 2021-07-02 22:04:58 -03:00
Matthew Chen
75de56236b Remove uiRead(). 2021-07-02 22:04:58 -03:00
Matthew Chen
03acf2ffdd Remove uiRead(). 2021-07-02 22:04:58 -03:00
Matthew Chen
786e7cef3d Fix build warnings. 2021-06-07 11:11:28 -04:00
Matthew Chen
010b135ab0 Add CVBodyTextLabel. 2021-06-02 20:42:55 -04:00
Matthew Chen
936b64b959 Add feature flag for data detection. 2021-05-11 10:12:58 -03:00
Matthew Chen
1da40bca75 Rework data detection in body text component. 2021-04-23 15:58:14 -03:00
Matthew Chen
151e1158a9 Rename CVItemViewModel, CVItemViewModelImpl. 2020-12-11 16:49:14 -03:00
Matthew Chen
111338b59d Rewrite conversation view. 2020-12-10 12:44:13 -03:00
Matthew Chen
66510bc18f DRY singleton accessors. 2020-09-17 21:13:14 -03:00
Nora Trapp
a3bb9e872e Fix mention theme changes 2020-08-04 14:09:06 -07:00
Nora Trapp
a39750113f Full suppoort for ention send + receive 2020-08-04 14:08:30 -07:00
Nora Trapp
4696a4d993 Mention sending 2020-08-04 14:08:30 -07:00
Matthew Chen
3cedd3ccdf Overhaul database observation. 2020-06-18 09:28:49 -03:00
Matthew Chen
b42f1968cc Fix build warnings around initializers. 2020-04-08 16:05:54 -03:00
Matthew Chen
b5c069ed95 Clean up VC initializers. 2020-04-08 09:26:25 -03:00
Nora Trapp
23ade7954f Add share button for media in message actions, fix message details gallery share 2019-12-16 15:39:02 -08:00
Nora Trapp
d2cb2b6637 Fix share sheet for iPad 2019-12-05 16:27:45 -08:00
Matthew Chen
0d42caf59f Respond to CR. 2019-10-24 12:04:25 -03:00
Matthew Chen
0be38de3b3 Respond to CR. 2019-10-24 12:04:25 -03:00
Matthew Chen
16e70eaf59 Respond to CR. 2019-10-24 12:04:25 -03:00
Matthew Chen
5116af899a Message forwarding. 2019-10-24 12:04:25 -03:00
Nora Trapp
473b88b497 Don't require ConversationViewController to maintain first responder status. 2019-10-17 11:41:58 -07:00
Michael Kirk
54812451f4 Update and apply palette. Consolidate dupes. 2019-09-24 15:12:51 -07:00
Michael Kirk
1a9c0fae1d GRDB: Fix disappearing messages vs. long text or media details
The generic observer delete was broken for GRDB, because we can't fetch the
uniqueId's of rowIds if the corresponding row was deleted. So instead, we
split the logic: Yap uses uniqueIds, GRDB uses row ids.
2019-09-16 07:53:00 -07:00
Matthew Chen
a5efaf8d16 Merge remote-tracking branch 'private/release/2.42.0' 2019-08-28 11:33:26 -03:00
Matthew Chen
cd88f4f012 Address sticky keyboards on iOS 12. 2019-08-27 14:50:29 -03:00
Matthew Chen
c9b162d1e2 Remove YDB & primary storage usage. 2019-08-14 09:10:48 -03:00
Matthew Chen
8ca337e2c3 Rework generic change observation. 2019-08-13 09:58:27 -03:00
Matthew Chen
1e363d2c65 Make uniqueId non-nil. 2019-07-31 10:50:59 -03:00
Nora Trapp
b1d6db7cd9 Cache naturalTextAlignment 2019-07-19 12:43:58 -07:00
Nora Trapp
e4e8132af0 Align message text using the dominant language direction. 2019-07-19 12:35:00 -07:00
Matthew Chen
77b9500154 Convert interactions to BaseModel. 2019-07-19 15:25:28 -03:00