зеркало из https://github.com/nextcloud/ios.git
end Trash bin.
This commit is contained in:
Родитель
8d648befc1
Коммит
b900856ca6
|
@ -2580,24 +2580,20 @@ class NCManageDatabase: NSObject {
|
|||
}
|
||||
|
||||
let realm = try! Realm()
|
||||
var filter = ""
|
||||
var predicate = NSPredicate()
|
||||
|
||||
realm.beginWrite()
|
||||
|
||||
if fileID != nil {
|
||||
if fileID == nil {
|
||||
|
||||
filter = "account =" + tableAccount.account
|
||||
predicate = NSPredicate(format: "account == %@", tableAccount.account)
|
||||
|
||||
} else {
|
||||
|
||||
filter = "account =" + tableAccount.account + " AND fileID = " + fileID!
|
||||
}
|
||||
|
||||
guard let result = realm.objects(tableTrash.self).filter(filter).first else {
|
||||
realm.cancelWrite()
|
||||
return
|
||||
predicate = NSPredicate(format: "account = %@ AND fileID = %@", tableAccount.account, fileID!)
|
||||
}
|
||||
|
||||
let result = realm.objects(tableTrash.self).filter(predicate)
|
||||
realm.delete(result)
|
||||
|
||||
do {
|
||||
|
|
|
@ -2484,7 +2484,7 @@
|
|||
[communication setCredentialsWithUser:_activeUser andUserID:_activeUserID andPassword:_activePassword];
|
||||
[communication setUserAgent:[CCUtility getUserAgent]];
|
||||
|
||||
NSString *path = [NSString stringWithFormat:@"%@%@/trashbin/%@/trash", _activeUrl, k_webDAV, _activeUserID];
|
||||
NSString *path = [NSString stringWithFormat:@"%@%@/trashbin/%@/trash", _activeUrl, k_dav, _activeUserID];
|
||||
|
||||
[communication emptyTrash:path onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *redirectedServer) {
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче