Skip to content

Commit

Permalink
[milestone/11.8.2] Milestone 11.8.2 (#1085)
Browse files Browse the repository at this point in the history
* updated version and build number for 11.8.2

* [fix/pdf-editing] Fix PDF editing (#1083)

* - update SDK with fix for enterprise#4934.

* - DisplayViewController: add .allowUpdatesUntilLocalModificationPersists to temporarily allow updates to the viewed file until the rendered item again is stored remotely and no longer a local modification
- DocumentEditingAction: when invoked from a PDFViewerViewController, pass it along to EditDocumentViewController, so it can make use of allowUpdatesUntilLocalModificationPersists
- EditDocumentViewController: set allowUpdatesUntilLocalModificationPersists of a hosting PDFViewerViewController to true when a file is edit in place and changes overwrite the original

* Added changelog entry

* Calens changelog updated

* [fix/branding-folder-color] Branding: Corporate Color as Folder Color (#1086)

* Adopt the corporate branding color to the folder color

* added changelog entry

* Calens changelog updated

* Calens changelog updated

Co-authored-by: hosy <[email protected]>

* [fix/continuous-audio-playback] Fix: Continuous Audio Playback (#1088)

* #4924 fixed continuous audio playback, which stopped, after two audio files, because of not setting the activeDisplayViewController, when starting a new audio file

* Added changelog entry

* Calens changelog updated

* fixed updating navigationbar title and buttons

* fixed scaling cover image to screen size

Co-authored-by: hosy <[email protected]>

* release notes and changelog updated

* Calens changelog updated

Co-authored-by: Felix Schwarz <[email protected]>
Co-authored-by: hosy <[email protected]>
  • Loading branch information
3 people authored Jan 17, 2022
1 parent 2524b7f commit 9ad6429
Show file tree
Hide file tree
Showing 16 changed files with 155 additions and 65 deletions.
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,39 @@
Changelog for ownCloud iOS Client [11.8.2] (2022-01-17)
=======================================
The following sections list the changes in ownCloud iOS Client 11.8.2 relevant to
ownCloud admins and users.

[11.8.2]: https://github.com/owncloud/ios-app/compare/milestone/11.8.1...milestone/11.8.2

Summary
-------

* Bugfix - Continuous Audio Playback: [#4924](https://github.com/owncloud/enterprise/issues/4924)
* Bugfix - PDF Editing: [#4934](https://github.com/owncloud/enterprise/issues/4934)
* Change - (Branding) Corporate Color as Folder Color: [#1069](https://github.com/owncloud/ios-app/issues/1069)

Details
-------

* Bugfix - Continuous Audio Playback: [#4924](https://github.com/owncloud/enterprise/issues/4924)

Fixed continuous audio playback, which stopped after two audio files.

https://github.com/owncloud/enterprise/issues/4924

* Bugfix - PDF Editing: [#4934](https://github.com/owncloud/enterprise/issues/4934)

Fixed bug that prevents changes to PDFs being saved in place.

https://github.com/owncloud/enterprise/issues/4934

* Change - (Branding) Corporate Color as Folder Color: [#1069](https://github.com/owncloud/ios-app/issues/1069)

Use the corporate color as folder color as default color (can be overridden by the specific
key/value pair).

https://github.com/owncloud/ios-app/issues/1069

Changelog for ownCloud iOS Client [11.8.1] (2021-12-22)
=======================================
The following sections list the changes in ownCloud iOS Client 11.8.1 relevant to
Expand Down
5 changes: 5 additions & 0 deletions changelog/11.8.2_2022-01-17/4857
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Change: (Branding) Corporate Color as Folder Color

Use the corporate color as folder color as default color (can be overridden by the specific key/value pair).

https://github.com/owncloud/ios-app/issues/1069
5 changes: 5 additions & 0 deletions changelog/11.8.2_2022-01-17/4924
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Continuous Audio Playback

Fixed continuous audio playback, which stopped after two audio files.

https://github.com/owncloud/enterprise/issues/4924
5 changes: 5 additions & 0 deletions changelog/11.8.2_2022-01-17/4934
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: PDF Editing

Fixed bug that prevents changes to PDFs being saved in place.

https://github.com/owncloud/enterprise/issues/4934
11 changes: 4 additions & 7 deletions fastlane/metadata-emm/en-US/release_notes.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
Sorting
Localized and improved sorting
Fix: PDF Editing
Fixed bug that prevents changes to PDFs being saved in place.

• Fix: Authentication Improvement
Fixed an OAuth2 token refresh problem

• Fix: Connection Problem
Fixed a possible connection problem in the single account view
• Fix: Continuous Audio Playback
Fixed continuous audio playback, which stopped after two audio files.

11 changes: 4 additions & 7 deletions fastlane/metadata-owncloud-online/en-US/release_notes.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
Sorting
Localized and improved sorting
Fix: PDF Editing
Fixed bug that prevents changes to PDFs being saved in place.

• Fix: Authentication Improvement
Fixed an OAuth2 token refresh problem

• Fix: Connection Problem
Fixed a possible connection problem in the single account view
• Fix: Continuous Audio Playback
Fixed continuous audio playback, which stopped after two audio files.

11 changes: 4 additions & 7 deletions fastlane/metadata/en-US/release_notes.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
Sorting
Localized and improved sorting
Fix: PDF Editing
Fixed bug that prevents changes to PDFs being saved in place.

• Fix: Authentication Improvement
Fixed an OAuth2 token refresh problem

• Fix: Connection Problem
Fixed a possible connection problem in the single account view
• Fix: Continuous Audio Playback
Fixed continuous audio playback, which stopped after two audio files.

24 changes: 12 additions & 12 deletions ownCloud.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -4730,8 +4730,8 @@
APP_BUILD_FLAGS = "$(inherited)";
APP_BUILD_FLAGS_SWIFT = "$(APP_BUILD_FLAGS)";
APP_PRODUCT_NAME = ownCloud;
APP_SHORT_VERSION = 11.8.1;
APP_VERSION = 207;
APP_SHORT_VERSION = 11.8.2;
APP_VERSION = 208;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
Expand Down Expand Up @@ -4799,8 +4799,8 @@
APP_BUILD_FLAGS = "$(inherited)";
APP_BUILD_FLAGS_SWIFT = "$(APP_BUILD_FLAGS)";
APP_PRODUCT_NAME = ownCloud;
APP_SHORT_VERSION = 11.8.1;
APP_VERSION = 207;
APP_SHORT_VERSION = 11.8.2;
APP_VERSION = 208;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
Expand Down Expand Up @@ -4863,8 +4863,8 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
APP_SHORT_VERSION = 11.8.1;
APP_VERSION = 207;
APP_SHORT_VERSION = 11.8.2;
APP_VERSION = 208;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = ownCloud/ownCloud.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
Expand Down Expand Up @@ -4897,8 +4897,8 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
APP_SHORT_VERSION = 11.8.1;
APP_VERSION = 207;
APP_SHORT_VERSION = 11.8.2;
APP_VERSION = 208;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = ownCloud/ownCloud.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
Expand Down Expand Up @@ -5255,8 +5255,8 @@
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
APP_SHORT_VERSION = 11.8.1;
APP_VERSION = 207;
APP_SHORT_VERSION = 11.8.2;
APP_VERSION = 208;
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = NO;
Expand Down Expand Up @@ -5299,8 +5299,8 @@
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
APP_SHORT_VERSION = 11.8.1;
APP_VERSION = 207;
APP_SHORT_VERSION = 11.8.2;
APP_VERSION = 208;
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = NO;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,10 @@ class DocumentEditingAction : Action {
if let fileURL = files.first?.url, let item = self.context.items.first {

if QLPreviewController.canPreview(fileURL as QLPreviewItem) {

let editDocumentViewController = EditDocumentViewController(with: fileURL, item: item, core: self.core)
let navigationController = ThemeNavigationController(rootViewController: editDocumentViewController)

editDocumentViewController.pdfViewController = hostViewController as? PDFViewerViewController
navigationController.modalPresentationStyle = .overFullScreen
viewController.present(navigationController, animated: true)
} else {
Expand Down
3 changes: 3 additions & 0 deletions ownCloud/Client/Actions/EditDocumentViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class EditDocumentViewController: QLPreviewController, Themeable {
var modifiedContentsURL: URL?
var dismissedViewWithoutSaving: Bool = false
var timer: DispatchSourceTimer?
var pdfViewController : PDFViewerViewController?

var source: URL {
didSet {
Expand Down Expand Up @@ -218,6 +219,8 @@ class EditDocumentViewController: QLPreviewController, Themeable {
}
case .updateContents:
if let core = core, let parentItem = item.parentItem(from: core) {
pdfViewController?.allowUpdatesUntilLocalModificationPersists = true

core.reportLocalModification(of: item, parentItem: parentItem, withContentsOfFileAt: url, isSecurityScoped: true, options: [OCCoreOption.importByCopying : true], placeholderCompletionHandler: { (error, _) in
if let error = error {
self.present(error: error, title: "Saving edited file failed".localized)
Expand Down
9 changes: 6 additions & 3 deletions ownCloud/Client/Viewer/DisplayHostViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -359,24 +359,27 @@ extension DisplayHostViewController {

@objc private func handleMediaPlaybackFinished(notification:Notification) {
if let mediaController = activeDisplayViewController as? MediaDisplayViewController {
if let displayViewController = adjacentViewController(relativeTo: mediaController, .after, includeOnlyMediaItems: true) {
if let displayViewController = adjacentViewController(relativeTo: mediaController, .after, includeOnlyMediaItems: true) as? MediaDisplayViewController {
self.setViewControllers([displayViewController], direction: .forward, animated: false, completion: nil)
activeDisplayViewController = displayViewController
}
}
}

@objc private func handlePlayNextMedia(notification:Notification) {
if let mediaController = activeDisplayViewController as? MediaDisplayViewController {
if let displayViewController = adjacentViewController(relativeTo: mediaController, .after, includeOnlyMediaItems: true) {
if let displayViewController = adjacentViewController(relativeTo: mediaController, .after, includeOnlyMediaItems: true) as? MediaDisplayViewController {
self.setViewControllers([displayViewController], direction: .forward, animated: false, completion: nil)
activeDisplayViewController = displayViewController
}
}
}

@objc private func handlePlayPreviousMedia(notification:Notification) {
if let mediaController = activeDisplayViewController as? MediaDisplayViewController {
if let displayViewController = adjacentViewController(relativeTo: mediaController, .before, includeOnlyMediaItems: true) {
if let displayViewController = adjacentViewController(relativeTo: mediaController, .before, includeOnlyMediaItems: true) as? MediaDisplayViewController {
self.setViewControllers([displayViewController], direction: .forward, animated: false, completion: nil)
activeDisplayViewController = displayViewController
}
}
}
Expand Down
58 changes: 34 additions & 24 deletions ownCloud/Client/Viewer/DisplayViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -371,35 +371,45 @@ class DisplayViewController: UIViewController, Themeable, OCQueryDelegate {
case neverUpdate
}
var updateStrategy : UpdateStrategy = .ask
var allowUpdatesUntilLocalModificationPersists : Bool = false

func shouldRenderItem(item: OCItem, isUpdate: Bool, shouldRender: @escaping (Bool) -> Void) {
if isUpdate {
switch updateStrategy {
case .ask:
OnMainThread {
let alert = UIAlertController(title: NSString(format: "%@ was updated".localized as NSString, item.name ?? "File".localized) as String, message: "Would you like to view the updated version?".localized, preferredStyle: .alert)

alert.addAction(UIAlertAction(title: "Show new version".localized, style: .default, handler: { [weak self] (_) in
self?.updateStrategy = .ask
shouldRender(true)
}))
alert.addAction(UIAlertAction(title: "Refresh without asking".localized, style: .default, handler: { [weak self] (_) in
self?.updateStrategy = .alwaysUpdate
shouldRender(true)
}))
alert.addAction(UIAlertAction(title: "Ignore updates".localized, style: .cancel, handler: { [weak self] (_) in
self?.updateStrategy = .neverUpdate
shouldRender(false)
}))

self.present(alert, animated: true)
}
if allowUpdatesUntilLocalModificationPersists {
if !item.locallyModified {
// once the modified file has been uploaded, item.locallyModified will no longer be true,
// so any changes after that will again be subject to the regular .updateStrategy procedure
allowUpdatesUntilLocalModificationPersists = false
}
shouldRender(true)
} else {
switch updateStrategy {
case .ask:
OnMainThread {
let alert = UIAlertController(title: NSString(format: "%@ was updated".localized as NSString, item.name ?? "File".localized) as String, message: "Would you like to view the updated version?".localized, preferredStyle: .alert)

alert.addAction(UIAlertAction(title: "Show new version".localized, style: .default, handler: { [weak self] (_) in
self?.updateStrategy = .ask
shouldRender(true)
}))
alert.addAction(UIAlertAction(title: "Refresh without asking".localized, style: .default, handler: { [weak self] (_) in
self?.updateStrategy = .alwaysUpdate
shouldRender(true)
}))
alert.addAction(UIAlertAction(title: "Ignore updates".localized, style: .cancel, handler: { [weak self] (_) in
self?.updateStrategy = .neverUpdate
shouldRender(false)
}))

self.present(alert, animated: true)
}

case .alwaysUpdate:
shouldRender(true)
case .alwaysUpdate:
shouldRender(true)

case .neverUpdate:
shouldRender(false)
case .neverUpdate:
shouldRender(false)
}
}
} else {
shouldRender(true)
Expand Down
8 changes: 5 additions & 3 deletions ownCloud/Client/Viewer/Media/MediaDisplayViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,14 @@ class MediaDisplayViewController : DisplayViewController {
// Construct image view overlay for AVPlayerViewController
let imageView = UIImageView(image: artworkImage)
imageView.translatesAutoresizingMaskIntoConstraints = false
imageView.contentMode = .center
imageView.contentMode = .scaleAspectFit
playerViewController?.contentOverlayView?.addSubview(imageView)

NSLayoutConstraint.activate([
imageView.centerYAnchor.constraint(equalTo: overlayView.centerYAnchor),
imageView.centerXAnchor.constraint(equalTo: overlayView.centerXAnchor)
imageView.leadingAnchor.constraint(equalTo: overlayView.leadingAnchor),
imageView.trailingAnchor.constraint(equalTo: overlayView.trailingAnchor),
imageView.topAnchor.constraint(equalTo: overlayView.topAnchor),
imageView.bottomAnchor.constraint(equalTo: overlayView.bottomAnchor)
])

// Create MPMediaItemArtwork to be shown in 'now playing' in the lock screen
Expand Down
27 changes: 27 additions & 0 deletions ownCloud/Release Notes/ReleaseNotes.plist
Original file line number Diff line number Diff line change
Expand Up @@ -1475,6 +1475,33 @@ Added an optional &quot;Wait for completion&quot; option to the &quot;Save File&
</dict>
</array>
</dict>
<dict>
<key>Version</key>
<string>11.8.2</string>
<key>ReleaseNotes</key>
<array>
<dict>
<key>Title</key>
<string>Fix: PDF Editing</string>
<key>Subtitle</key>
<string>Fixed bug that prevents changes to PDFs being saved in place.</string>
<key>Type</key>
<string>Fix</string>
<key>ImageName</key>
<string>bandage</string>
</dict>
<dict>
<key>Title</key>
<string>Fix: Continuous Audio Playback</string>
<key>Subtitle</key>
<string>Fixed continuous audio playback, which stopped after two audio files.</string>
<key>Type</key>
<string>Fix</string>
<key>ImageName</key>
<string>bandage</string>
</dict>
</array>
</dict>
</array>
</dict>
</plist>
2 changes: 2 additions & 0 deletions ownCloudAppShared/User Interface/Theme/ThemeCollection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,8 @@ public class ThemeCollection : NSObject {
defaultSearchBarColor.labelColor = UIColor(hex: 0x000000)
defaultSearchBarColor.secondaryLabelColor = UIColor.gray
defaultSearchBarColor.backgroundColor = UIColor(hex: 0xF7F7F7)
self.tableRowColors.symbolColor = darkColor
self.tableRowHighlightColors.symbolColor = darkColor
}

self.searchBarColors = colors.resolveThemeColorCollection("Searchbar", defaultSearchBarColor)
Expand Down

0 comments on commit 9ad6429

Please sign in to comment.