Commit Graph

31 Commits

Author SHA1 Message Date
Max Radermacher
11022cf566
Reformat AvatarBuilder 2024-01-17 11:42:39 -06:00
Harry
aa0e250cb7
[Death to TSAccountManager, long live TSAccountManager][9] Migrate usages of old TSAccountManager to new 2023-10-05 08:56:08 -07:00
Max Radermacher
6825c764ed
Remove unused buildAvatar method 2023-09-11 22:19:07 -05:00
Max Radermacher
08f7e848e1
[ServiceId] Clean up various odds and ends 2023-08-23 11:50:53 -05:00
Igor Solomennikov
52f0015dfe
New set of icons. 2023-06-22 17:38:01 -07:00
Igor Solomennikov
7790837eb5
Remove unnecessary "@objc" in SignalMessaging. 2023-05-16 16:41:49 -07:00
Evan Hahn
96ef31f130
Add new (dormant) registration profile setup screen
Most notably, this required making a change to `AvatarBuilder` to let us
get a default avatar with no current user.
2023-02-17 11:39:19 -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
Evan Hahn
57c47ced2c Fix operator_whitespace SwiftLint violations
This fixes violations of [SwiftLint's `operator_whitespace` rule][0].
This is a whitespace-only change.

[0]: https://realm.github.io/SwiftLint/operator_whitespace.html
2022-07-07 17:38:38 -07:00
Nora Trapp
d87fa8c16c Add new fonts for text stories 2022-03-17 14:30:19 -07:00
Jordan Rose
e8021225a3 Do not load avatar image data in the NSE
Not only should we not build avatars, but even loading the image data
costs us our limited memory space, especially when it's a system
contact avatar whose size we have no control over. Instead, record the
cache key for that avatar in the database.

(Unfortunately, we can't jump to the cache like this in the main app,
because then we'd have no way to check if an avatar has *changed*,
particularly for system contacts.)
2022-03-10 10:32:46 -08:00
Nora Trapp
0948ba837b Cache built avatars to disk for NSE 2022-02-14 11:59:13 -08:00
Nora Trapp
b2c0e975b6 Store group avatars on disk 2022-02-09 11:56:03 -08:00
Michelle Linington
5a645228b0 Fix issue where avatars flicker sporadically
Our AvatarBuilder caches were cleared in their entirety any time a
profile changes. If a profile update raced with a avatar fetch in
ConversationAvatarView, they'd blink briefly while the cached items were
removed.

This change ensures that we're only clearing out avatars that are
associated with an updated profile.
2021-11-22 17:01:07 -08:00
Michelle Linington
0b9c6727a6 Fixes various small bugs
- Clear out avatar cache on local profile changes too
- ConversationAvatarView properly handles local profile updates
- Fix some tiny UI bugs in group calls
2021-11-10 21:27:17 -08:00
Matthew Chen
d7a4154c52 Disable notification intent avatars in NSE. 2021-10-08 10:41:11 -03:00
Eugene Bistolas
e1c43e3583 Additional logging for prod NSE avatar generation 2021-08-25 14:24:19 -10:00
Matthew Chen
98e3bd81a0 Leverage pre-cached avatars. 2021-08-23 18:20:42 -03:00
Matthew Chen
bf6681f68d Leverage pre-cached avatars. 2021-08-23 18:20:42 -03:00
Matthew Chen
2c1f0c1c30 Elaborate local profile avatar logging. 2021-08-19 14:39:04 -03:00
Matthew Chen
e734b0beb7 Respond to CR. 2021-08-04 17:08:40 -03:00
Matthew Chen
404062ed29 Cache formatting of PersonNameComponents. 2021-08-04 17:08:28 -03:00
Nora Trapp
0322acd7f1 Auto select photo avatar 2021-07-16 18:36:33 -07:00
Nora Trapp
d7d96fa715 Fix fuzziness in default avatar rendering 2021-07-16 18:36:33 -07:00
Nora Trapp
dee9029002 Use a larger font size for emoji avatar, limit to 3 characters 2021-07-16 17:24:08 -07:00
Nora Trapp
b217dbf859 Finalized default avatar set 2021-07-16 17:22:32 -07:00
Nora Trapp
a07aec245d Finalized avatar builder colors 2021-07-16 13:55:03 -07:00
Matthew Chen
aeb9c978d8 Minor fixes. 2021-07-16 09:16:37 -03:00
Nora Trapp
89fbeb432c Tweak avatar editor keyboard interactions 2021-07-15 20:04:22 -07:00
Nora Trapp
0b40468295 Avatar editor 2021-07-15 20:04:22 -07:00
Nora Trapp
29a31bdd20 Restructure AvatarBuilder to support new avatar styles 2021-07-15 20:04:22 -07:00