Commit Graph

16 Commits

Author SHA1 Message Date
Igor Solomennikov
7790837eb5
Remove unnecessary "@objc" in SignalMessaging. 2023-05-16 16:41:49 -07:00
Max Radermacher
4891a4beea
Split AppSetup into discrete method calls 2023-04-12 18:18:25 -07:00
Max Radermacher
898fd2c4d5
Clean up queue names 2023-02-27 14:16:09 -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
Jordan Rose
094c8290ce Remove unnecessary NotificationCenter.removeObserver calls
As of iOS 9, selector-based observers in NotificationCenter do not
need to be explicitly unregistered.
2022-08-02 17:43:52 -07:00
Matthew Chen
b4aa2aa1c3 Clean up app readiness. 2021-03-25 09:36:16 -03:00
Matthew Chen
ad6bda8a44 Rename singleton accessors. 2020-09-17 21:11:07 -03:00
Matthew Chen
993dca8ec9 Remove redundant NotificationName. 2020-01-27 10:53:23 -03:00
Michael Kirk
97dcad7015 Fix sleep manager v. main thread 2019-11-22 18:18:56 -07:00
Michael Kirk
82e559d11b Use swift macros for main thread assert 2018-08-23 10:29:49 -06:00
Matthew Chen
26001e49d1 Unify log tags. 2018-08-15 10:24:29 -04:00
Matthew Chen
28e26e1f75 Migrate to Swift 4. 2018-05-30 15:05:02 -04:00
Matthew Chen
6caa5b87b6 Add more asserts around thread in SAE. 2018-04-13 14:59:38 -04:00
Matthew Chen
e77c3e6717 Retain changes from session database branch. 2018-01-10 12:18:23 -05:00
Matthew Chen
7a1e47cd26 Add asserts around Swift singletons. 2017-12-07 13:57:45 -05:00
Michael Kirk
89b9887f1d Make DeviceSleepManager extension compatible
// FREEBIE
2017-12-07 10:13:47 -05:00