Change appearance of controls in media viewer:
• use dark chrome background for top and bottom panels.
• move "Delete" into (•••) submenu at the top.
Appearance tweaks for media album strip at the bottom of media viewer.
• update design to latest spec.
• make media strip view configurable (border color and width, size, corner rounding).
* Enable zooming for photos and videos.
* Shrink media when keyboard is up.
* Fix minor animation issues on iPad.
* Fix "Add Message" placeholder not fading out properly.
* make shouldCancelNavigationBack a var
* rename OWSNavigationView->OWSNavigationChildController
* forward delegate calls to OWSNavigationController
* apply theme and style to OWSNavigationBar consistently
fix themeing on gif picker controller
* Use topPinned navbar position. Size the blur effect view using the background view
* Use fade animation when hiding the navigation bar
* fix issues with reduced transparency setting
* pr feedback
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
* Disable view once media in stories send flow
* Remove stories from picker if sending a view once media
* dont show view once button if sending to stories from sharesheet
* fix conflict between story viewer context menu drag and navigational pan gestures
* Fix RTL chevrons on story list
* swipe only between hidden stories OR visible stories, never both
* Add table row swipe actions for hiding/unhiding stories & update icons to sharp corners instead of rounded
* make story viewer context menu always dark theme to match design mocks
* dont fail dev builds when harmlessly double dismissing a context menu, which happens if backgrounding the app while the context menu is open
* update my story row icons to 16pt
* swipe to delete on my story rows
* Use themed icons. Get filled versions of various context menu icons from design
• provide visual feedback when user selects media quality.
• add VoiceOver support.
• fix retain cycle caused leak of ActionSheetController objects.
• correct bottom margin on non-notch devices.
The block-based API returns a token that needs to be explicitly
unregistered, *and* the block should not capture 'self' strongly.
The fixes in this PR come in three flavors:
1. Switch to the selector-based API, sometimes taking advantage of
the fact that extra arguments to an Objective-C method can be
safely discarded (because they are passed at +0).
2. Save the observer token and unregister in deinit.
3. Comment why it's safe to leave the observer registered forever
in this particular case.
Repro steps:
* have an album of three media: the first two are static, the last one is a video.
* go to the video and tap into message text input to pop the keyboard.
* dismiss keyboard and swipe to the static image.
Expected:
Static image tools buttons to be visible.
Result:
Static image tools buttons not visible.
Issue is a very weird one and likely is caused by some obscure bug with UIKit / UIStackView.
It looks like this was removed in
7f4a5f3f7b.
`git grep -w AttachmentCaptionDelegate` and `git grep -w
AttachmentCaptionViewController` both return no results after removing
this file.
Long recipient name in the top right corner would not be faded at the
end upon initial presentation.
This was happening because subviews did not have their final frames at
the end of `layoutSubviews`.
The fix is to call method that updates fading on next run loop run.
• improvement: correct amount of padding between text field and keyboard.
• fix: text field isn't tall enough when there's a message draft and
keyboard isn't up.
• fix: onscreen keyboard briefly changes style to 'light' upon dismissal.
_I recommend reviewing this with whitespace changes disabled._
This fixes violations of [SwiftLint's `implicit_getter` rule][0] by
removing explicit getters when an implicit one would do.
[0]: https://realm.github.io/SwiftLint/implicit_getter.html
Steps to reproduce:
• open group chat and type a message containing "@" but don't send it.
• tap on + and select last photo/video from the strip.
• observe app crashing.
Cause of crash:
Attempting to access a child view controller of UIPageViewController
while using force unwrap when UIPageViewController's view is not yet loaded.
The fix:
• Remove force unwrapping (linter was complaining about that too).
• Add "isViewLoaded" check to the method that was causing the crash.
notImplemented() ends up forwarding to fatalError() anyway, but before
it does so it flushes our logs. That's probably good to have. I think
most of these come from the default implementations Xcode provides for
you with a fix-it.