Преглед на файлове

coding

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana преди 2 години
родител
ревизия
1931950c8d
променени са 1 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 4 1
      Widget/Files/FilesData.swift

+ 4 - 1
Widget/Files/FilesData.swift

@@ -250,6 +250,9 @@ func getFilesDataEntry(configuration: AccountIntent?, isPreview: Bool, displaySi
                 if datas.count == filesItems { break}
             }
 
+            let alias = (account.alias.isEmpty) ? "" : (" (" + account.alias + ")")
+            let footerText = "Files " + NSLocalizedString("_of_", comment: "") +  " " + account.displayName + alias
+
             if error != .success {
                 completion(FilesDataEntry(date: Date(), datas: datasPlaceholder, isPlaceholder: true, tile: title, footerImage: "xmark.icloud", footerText: error.errorDescription))
             } else if datas.isEmpty {
@@ -260,7 +263,7 @@ func getFilesDataEntry(configuration: AccountIntent?, isPreview: Bool, displaySi
                 }
                 completion(FilesDataEntry(date: Date(), datas: datasPlaceholder, isPlaceholder: true, tile: title, footerImage: "checkmark.icloud", footerText: footerText))
             } else {
-                completion(FilesDataEntry(date: Date(), datas: datas, isPlaceholder: false, tile: title, footerImage: "checkmark.icloud", footerText: NCBrandOptions.shared.brand + " files"))
+                completion(FilesDataEntry(date: Date(), datas: datas, isPlaceholder: false, tile: title, footerImage: "checkmark.icloud", footerText: footerText))
             }
         }
     }