Commit Graph

16 Commits

Author SHA1 Message Date
Max Radermacher
898fd2c4d5
Clean up queue names 2023-02-27 14:16:09 -08:00
Pete Walters
f1c4eb6b7b
Fix unreadable search result highlighting
CVTextLabel incorrectly attempts to set default .font
and .foregroundColor on the label text, removing any
existing font & color attributes. This results
in unreadable text when displaying search results.

Instead, add helper method to set default attributes on
attributed strings, but only on ranges that don't have the
attribute already defined.
2023-02-02 10:17:38 -06: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
Michelle Linington
4ada6b3a3f Derive bundle ID from an Xcode build setting
See [#5423][5423].

[5423]: https://github.com/signalapp/Signal-iOS/pull/5423
2022-09-21 18:10:42 +00:00
Sasha Weiss
c96144ad38
Always configure the textLabel in a CVComponentSysteMessage 2022-09-19 14:14:50 -07:00
Sasha Weiss
07a5e95d6a
Show the MemberActionSheet for tapped names in group system messages, reapplied 2022-09-06 14:40:01 -07:00
Max Radermacher
6955b6f53a Revert tapping names in group system messages
- Revert "More flexible selection styling in CVTextLabel"
  (commit e1317d814c)

- Revert "Show the MemberActionSheet for tapped names in group system messages"
  (commit 48bc3c07d0)
2022-08-26 11:43:58 -07:00
Sasha Weiss
e1317d814c
More flexible selection styling in CVTextLabel 2022-08-25 15:33:28 -07:00
Sasha Weiss
48bc3c07d0
Show the MemberActionSheet for tapped names in group system messages 2022-08-25 13:03:38 -07:00
Sasha Weiss
36eb0be145
Make CVComponentDelegate not an @objc protocol anymore 2022-08-23 22:50:27 -07:00
Sasha Weiss
fb11013859
Rename CVBodyTextLabel to CVTextLabel 2022-08-23 22:00:47 -07:00
Sasha Weiss
86d5999bf7
Remove duplicate call to animate in label 2022-08-23 21:05:13 -07:00
Max Radermacher
2bd247b0d9
Fix measureLabel… for attributed strings
The comment indicated that the existing fonts for particular subranges
should not be overwritten. However, the existing font was being
overwritten, which resulted in the measured size being too small.

The fix is to apply the default font only to ranges which don’t already
specify their own font (the intended behavior according to the comment).
2022-07-26 17:19:20 -07:00
Jordan Rose
72bdb33b05 Set CVBodyTextLabel's contentMode to redraw on bounds changes
This is a quick workaround for a behavior change in iOS 15.4 that's
causing CVBodyTextLabel to draw stretched or truncated text due to
cell reuse---the text is drawn in the cell's old size (which may be
insufficient, truncating the text), then the size changes and the
content that *is* drawn is potentially stretched.

Credit to Martin for finding this; I just profiled it to make sure it
wasn't going to be prohibitive.
2022-03-30 16:31:30 -07:00
Dimitris Apostolou
62724cf0be Fix typos 2022-03-18 11:31:06 -07:00
Matthew Chen
c416609108 Add SignalUI framework target. 2021-10-19 09:39:53 -03:00