Commit Graph

38 Commits

Author SHA1 Message Date
Max Radermacher
b1c09018b4
Rename cached anyFetch to fetchViaCache 2026-02-19 18:17:41 -06:00
Sasha Weiss
d267ec8305
Run swiftformat . 2025-12-30 11:34:05 -08:00
Harry
24f5e73633
Consolidate oversize text handling 2025-07-30 13:27:06 -07:00
Sasha Weiss
bb048e8b59
One transaction type to rule them all and in the darkness bind them 2025-03-13 21:43:35 -07:00
Max Radermacher
4c3b4e3a83
Remove anyReload methods from codegen 2025-01-07 16:41:42 -06:00
Max Radermacher
3c9fa13b2f
Add MainActor annotations for db change observers 2024-12-13 17:14:49 -06:00
Sasha Weiss
2000b82c0b
One KeyValueStore to rule them all 2024-11-15 18:47:54 -06:00
Sasha Weiss
dadca9e032
Directly adopt KeyValueStore in SDSKeyValueStore 2024-11-15 14:54:30 -08:00
Harry
b3b14bc97f
Protocolize+make public DatabaseChangeObserver 2024-10-22 10:42:16 -07:00
Ehren Kret
de32c7799d remove NSObject and Dependencies extension computed vars for SignalServiceKit 2024-10-11 23:12:59 -05:00
Max Radermacher
07baa170f7
Remove “collection” concept from database types 2024-08-20 18:22:00 -05:00
Sasha Weiss
78ae578aa0
Use the withDefaults pattern for TSOutgoingMessageBuilder 2024-08-06 10:22:07 -07:00
Sasha Weiss
3cdf735b40
Pare down TSInteraction initializers 2024-08-06 10:06:20 -07:00
Sasha Weiss
6ff76dd7e6
Do away with some ObjC test infra 2024-05-06 09:57:21 -07:00
Harry
8ef0ddf52e
Remove attachmentIds from MessageBuilder 2024-04-08 11:18:59 -07:00
Max Radermacher
20783085bb
Replace SAMKeychain with direct keychain access 2024-04-05 21:50:00 -05:00
Max Radermacher
42c704a4e3
Remove some debug/verbose lines 2024-03-19 19:24:54 -05:00
Max Radermacher
e8d8362e5f Simplify SDSDatabaseStorageObservationTest 2023-04-13 10:02:09 -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
Matthew Chen
9271f83624 Remove databaseChangesWillUpdate. 2021-09-08 21:41:13 -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
86b8eb08b8 Remove YapDatabase.
Apply asset from design.

Fix rebase breakage.
2021-03-25 11:41:16 -03:00
Matthew Chen
d0cbf8cfd0 Rework dependency access. 2021-03-25 09:24:27 -03:00
Matthew Chen
4c432b1ac3 Fix broken tests. 2020-09-17 17:31:23 -03:00
Nora Trapp
18e19088a5 Fix broken tests 2020-08-28 13:10:47 -07:00
Fumiaki Yoshimatsu
93e5503b87 Fixed two tests related to UIDatabaseSnapshotDelegate. 2020-08-28 09:42:45 -07:00
Matthew Chen
154805cf68 Fix broken tests. 2020-06-23 10:04:39 -03:00
Matthew Chen
3cedd3ccdf Overhaul database observation. 2020-06-18 09:28:49 -03:00
Matthew Chen
dd42dcca49 Remove YDB from views. 2020-04-07 13:51:02 -03:00
Matthew Chen
031eafe8fe Fix broken tests. 2019-10-04 16:31:50 -03: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
Michael Kirk
53b2fc1929 touches take effect even in a no-op deferred transaction.
UIDatabaseObserver orchestrates notifying views when a transaction commits.
We back UIDatabaseObserver with a DatabaseRegionObserver

DatabaseRegionObservers are not notified if the transaction contains no changes:

    https://github.com/groue/GRDB.swift/blob/af0ac15/GRDB/Core/DatabaseRegionObservation.swift#L119

However the more general TransactionObservers *are* notified even if the
transaction contains no changes. Nicely, GRDB does some work to ensure this is
true even in the event of a deferred transaction. See this comment on `databaseDidCommitEmptyDeferredTransaction`

da459386a0/GRDB/Core/TransactionObserver.swift (L444)
2019-09-04 21:47:57 -06:00
Matthew Chen
c2ae2037d4 Fix rebase breakage. 2019-08-26 13:18:49 -03:00
Matthew Chen
79b1d31f20 Don't load YDB unless necessary.
Don't load YDB unless necessary.

Don't load YDB unless necessary.

Don't load YDB unless necessary.
2019-08-26 13:18:30 -03:00
Matthew Chen
58eccfe357 Fix test breakage. 2019-08-13 17:03:09 -03:00
Matthew Chen
8ca337e2c3 Rework generic change observation. 2019-08-13 09:58:27 -03:00