Skip to content

Commit

Permalink
v4.3.3 (131)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisballinger committed Jul 14, 2018
1 parent 8edfcf1 commit c2a7f28
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 29 deletions.
24 changes: 13 additions & 11 deletions ChatSecure/Classes/Controllers/FileTransferManager.swift
Expand Up @@ -155,17 +155,19 @@ public class FileTransferManager: NSObject, OTRServerCapabilitiesDelegate {

// Resume downloads, i.e. look for media items that are partially downloaded and retry getting them. TODO - use ranges
@objc public func resumeDownloads() {
connection.asyncRead { [weak self] (transaction) in
let unfinished = transaction.unfinishedDownloads()
self?.internalQueue.async {
for mediaItem in unfinished {
if let downloadMessage = mediaItem.parentObject(with: transaction) as? OTRDownloadMessage,
downloadMessage.messageError == nil {
self?.downloadMedia(downloadMessage)
}
}
}
}
/// https://github.com/ChatSecure/ChatSecure-iOS/issues/1034
DDLogWarn("WARN: Download resumption is disabled. See https://github.com/ChatSecure/ChatSecure-iOS/issues/1034 for more information.")
// connection.asyncRead { [weak self] (transaction) in
// let unfinished = transaction.unfinishedDownloads()
// self?.internalQueue.async {
// for mediaItem in unfinished {
// if let downloadMessage = mediaItem.parentObject(with: transaction) as? OTRDownloadMessage,
// downloadMessage.messageError == nil {
// self?.downloadMedia(downloadMessage)
// }
// }
// }
// }
}

/// This will fetch capabilities and setup XMPP transfer module if needed
Expand Down
Expand Up @@ -149,19 +149,21 @@ public extension YapDatabaseReadTransaction {
public extension YapDatabaseReadTransaction {

public func unfinishedDownloads() -> [OTRMediaItem] {
guard let secondaryIndexTransaction = self.ext(SecondaryIndexName.mediaItems) as? YapDatabaseSecondaryIndexTransaction else {
return []
}
var unfinished: [OTRMediaItem] = []
let queryString = "Where \(MediaItemIndexColumnName.transferProgress) < 1 AND \(MediaItemIndexColumnName.isIncoming) == 1"
let query = YapDatabaseQuery(string: queryString, parameters: [])
secondaryIndexTransaction.enumerateKeysAndObjects(matching: query) { (key, collection, object, stop) in
if let download = object as? OTRMediaItem {
unfinished.append(download)
} else {
DDLogError("Non-media item object in downloads index \(object)")
}
}
return unfinished
/// https://github.com/ChatSecure/ChatSecure-iOS/issues/1034
return []
// guard let secondaryIndexTransaction = self.ext(SecondaryIndexName.mediaItems) as? YapDatabaseSecondaryIndexTransaction else {
// return []
// }
// var unfinished: [OTRMediaItem] = []
// let queryString = "Where \(MediaItemIndexColumnName.transferProgress) < 1 AND \(MediaItemIndexColumnName.isIncoming) == 1"
// let query = YapDatabaseQuery(string: queryString, parameters: [])
// secondaryIndexTransaction.enumerateKeysAndObjects(matching: query) { (key, collection, object, stop) in
// if let download = object as? OTRMediaItem {
// unfinished.append(download)
// } else {
// DDLogError("Non-media item object in downloads index \(object)")
// }
// }
// return unfinished
}
}
4 changes: 2 additions & 2 deletions ChatSecure/Info.plist
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>4.3.2</string>
<string>4.3.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -35,7 +35,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>130</string>
<string>131</string>
<key>FacebookAppID</key>
<string>447241325394334</string>
<key>FacebookDisplayName</key>
Expand Down
2 changes: 1 addition & 1 deletion Submodules/ChatSecure-Metadata
17 changes: 16 additions & 1 deletion fastlane/Deliverfile
Expand Up @@ -17,15 +17,30 @@
# beta_ipa "./app.ipa"

# The version of your app - remove this if you provide an ipa file
app_version "4.3.2"
app_version "4.3.3"
submit_for_review false
skip_binary_upload true
# overwrite_screenshots true
skip_screenshots true
force true

metadata_path "./Submodules/ChatSecure-Metadata/metadata"
screenshots_path "./Submodules/ChatSecure-Metadata/screenshots"

release_notes({
'default' => "v4.3.3:
* Actually fix crash on launch by disabling download resumption
v4.3.2:
* Fix crash on launch when resuming downloads
v4.3.1:
* Fix bug causing duplicate MAM messages
* No longer expires the last remaining OMEMO key after it hasn't been seen for > 30 days
* Minor bug fixes
Changelog: https://github.com/chatsecure/chatsecure-ios/compare/v4.3.0...v4.3.3
",
})

###################### More Options ######################
# If you want to have even more control, check out the documentation
# https://github.com/KrauseFx/deliver/blob/master/Deliverfile.md
Expand Down

0 comments on commit c2a7f28

Please sign in to comment.