Commit Graph

57 Commits

Author SHA1 Message Date
Adam Sharp
b42710cf90 Work around use of deprecated UIButton API
The old UIButton API is still functional as long as we don't use
UIButton.Configuration, so we can safely ignore these warnings until we're
ready to adopt the configuration API across the codebase.
2024-07-03 14:27:48 -04:00
Harry
427ee2b087
Use TSResource in ViewOnceMessageViewController 2024-05-07 15:04:01 -07:00
Harry
2e0359908c
Don't treat view once looping gifs as videos 2024-05-06 12:06:44 -05:00
Harry
9993694197
Use TSResourceStream directly in VideoPlayer to create an AVAsset 2024-05-03 14:34:30 -07:00
Harry
633014ae72
Remove a few easy TSAttachmentStream bridges 2024-05-03 14:33:53 -07:00
Harry
0be599960e
Add isVisualMedia equivalent to TSResourceStream 2024-04-15 09:44:57 -07:00
Harry
ec181d09b8
TSAttachment->TSResource cleanups 2024-04-15 09:44:21 -07:00
Ehren Kret
cf2a2c8148 move two more mime type util functions to swift 2024-04-11 22:19:16 -05:00
Harry
ae67a311ff
Replace foo as? TSAttachmentStream with foo.asResourceStream() 2024-04-11 13:46:40 -07:00
Jordan Rose
b0de59f2e2 Remove required from every init that is not dynamically dispatched
This included:
- Removing unavailable inits wholesale if no longer `required`
- Marking a few classes `final` so they could continue using
  `Self(...)` rather than `OWSWhatever(...)`
2024-04-01 15:27:20 -07:00
Max Radermacher
42c704a4e3
Remove some debug/verbose lines 2024-03-19 19:24:54 -05:00
Harry
4600fbd440
Add initial TSResourceStore 2024-02-28 08:20:29 -08:00
Harry
00a73e072d
Use transactions in TSMessage attachment id(s) getters/setters 2024-02-06 08:50:44 -08:00
Harry
2a95e36240
Push TSAttachment's TSAttachmentType getter methods up one level, requiring the containing message 2024-02-02 13:53:47 -08:00
Harry
a97772265d
Add -MimeType suffix to TSAttachment getters that exclusively use MimeType 2024-01-30 09:38:48 -08:00
Igor Solomennikov
52f0015dfe
New set of icons. 2023-06-22 17:38:01 -07:00
Igor Solomennikov
0686b39547 Add necessary imports to Swift files.
Those would be required for future PRs.
2023-06-13 14:46:12 -07:00
Igor Solomennikov
a9b9e01519
Convert RemoteVideoView to Swift. 2023-06-12 11:09:16 -07:00
Igor Solomennikov
f8a79687a7
Remove unnecessary @objc from the main app target. 2023-05-16 16:33:45 -07:00
Igor Solomennikov
6dd3d9a6f2
Convert all convenience methods in UIFont+OWS to Swift. 2023-04-18 17:14:51 -07:00
Igor Solomennikov
71cbc9d80d
Rename OWSVideoPlayer to VideoPlayer and stop exposing class to ObjC. 2023-03-15 11:52:19 -07:00
Max Radermacher
a94d052ff7 Remove redundant “does file exist?” check 2023-01-23 09:39:43 -08:00
Evan Hahn
a941c82c14
Prefer isEmpty with strings
This change may improve performance slightly but should have no other
user impact.

`myString.isEmpty` is faster than `myString.count == 0` or equivalent,
because computing `count` may require iterating over the string.

I tried to fix all occurrences of this.

Tested this by sending a message in a group and doing a full
re-registration, just in case I broke something there.
2022-11-01 17:53:46 -05: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
7567dc146f Lint 2022-01-12 23:19:36 -08:00
Michelle Linington
76f13a4373 Fixes a bunch of unresolved symbol errors
Things succeed when building, but before and after Xcode is littered
with errors.
2022-01-12 23:19:36 -08: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
03acf2ffdd Remove uiRead(). 2021-07-02 22:04:58 -03:00
Michelle Linington
054c7a0b0c MP4 looping media support
- Fetch mp4s from Giphy for showing previews
- Fetch mp4s from Giphy for sending (behind featuree flag)
- A new flag on attachments to tag a video as "looping media"
- Videos tagged with this flag will be shown on repeat
2021-04-22 14:53:47 -07:00
Matthew Chen
34adb0b9fe Respond to CR. 2020-12-19 08:16:55 -03:00
Matthew Chen
0763c37bd2 Bug fixes. 2020-12-19 08:13:27 -03:00
Matthew Chen
096ed67bb9 Convert font style convenience methods to properties. 2020-10-06 13:09:45 -03:00
Matthew Chen
66510bc18f DRY singleton accessors. 2020-09-17 21:13:14 -03:00
Matthew Chen
825cb06edb Animated sticker support. 2020-09-02 13:44:15 -03:00
Matthew Chen
587b8f2c36 Resumable attachment download. 2020-08-01 12:18:13 -03: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
Michael Kirk
4d23a16b63 fix typo in method name 2020-02-17 16:26:31 -07:00
Nora Trapp
5962d2c5f7 Only the X dismisses a view-once view 2020-01-10 13:04:15 -08:00
Matthew Chen
e46eefe50e Remove readReturningResult(). 2019-11-14 10:39:33 -03:00
Nora Trapp
3917eb479b Merge branch 'release/2.45.0' 2019-10-25 19:43:43 -07:00
Nora Trapp
a949b7f412 Fix some warnings and YDB full text search tests 2019-10-25 19:10:52 -07:00
Nora Trapp
473b88b497 Don't require ConversationViewController to maintain first responder status. 2019-10-17 11:41:58 -07:00
Matthew Chen
fc77b0fa2d Merge remote-tracking branch 'private/release/2.44.0' 2019-09-27 11:31:22 -03:00
Michael Kirk
f6747076df View Once Video 2019-09-26 12:39:26 -07:00
Michael Kirk
54812451f4 Update and apply palette. Consolidate dupes. 2019-09-24 15:12:51 -07:00