* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* Improved the Media metadata, ImageCache, convert Live Photo (#2698)

* Update NCManageDatabase+Metadata.swift
* Update NCMedia.swift
* new db updateMetadas
* updateMetadas
* convertLivePhotoQueue
* Update NCManageDatabase+Metadata.swift

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* comments

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* Livephoto improvements (#2702)


Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* new Build

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* new DB version

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* fix HUD

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* improvements code

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* build 2

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* improvements code

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* NextcloudKit 2.9.3

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix Version 4.9.5 (#2704)

* fix

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Improve code

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* lint

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* lint

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* improved code

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Version 4.9.6

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* fix upload livephoto, remove old code

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* fix Upload Live Photo

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* improved code Live photo

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* remove “old” hud for copy/move/delete file

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* NextcloudKit 2.9.4

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* added description

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* improved code

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Virus detect (#2707)

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* Download improvements (#2710)

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* Queue message (#2713)

* coding

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* cleaning

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Badge

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Message (#2715)

* notificationCenter

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* lint

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* set NCImageCache to 500

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* cleaning

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Indicator

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* coding

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* progress

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* withQueryDB

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* coding

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* lint

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* lint

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* cancel upl /dowl

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* fix

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* cod

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* lint

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* lint

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* cleaning

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* lint

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* fix

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* enhanced

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* enhanced

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* add log

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* enhanced

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* enhanced

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* enhanced

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* Background download (#2730)

Prepared source code for the background download and some fix
---------

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* fix warning Constraints

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Mediaview detail - bug fixes (#2718)

* Fix hiding with animation

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* Adjust constraints

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* Prevent button from opening details when downloading

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* fix

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

---------

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>
Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Co-authored-by: Marino Faggiana <marino@marinofaggiana.com>

* fix

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* E2ee - change DB + filedrop (#2733)

* decodeMetadataV20

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* fix

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* lint

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* enhanced

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* E2ee (#2738)

* cod

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* change version DB

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* E2ee (#2740)

* fix DB
* build 3

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* E2ee fix UI (#2741)

* fix menu share

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Build 4

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

---------

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* Remove title from nav bar (#2743)

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* #2742

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* fix - change login (#2750)

* fix - change name Intro

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* remove NCKeychain().disableIntro

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

---------

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* set iOS 15 for all

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* E2ee path version (#2751)

---------

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* Clients diagnostics (#2752)

* SecurityGuardDiagnostics

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Translucent bars (#2757)


Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* E2ee test (#2759)

* fix subfolders

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* fix verifySignature

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

---------

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Media update (Step 1) (#2758)

* coding

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* build 1

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* fix

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* fix

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* cod

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* build 2

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* clean

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* build 3

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* fix order

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* coding

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* new ThreadSafeArray

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* delete animation

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* fix(i18n): host name -> hostname (#2762)

Reported at Transifex.

Signed-off-by: rakekniven <2069590+rakekniven@users.noreply.github.com>

* b. 4

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* fix delete

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* Media 2 (#2770)


---------

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* new version

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* cleaning

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* fix

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* New navigation bar menu (#2761)

* Add new menu

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* Download - sessionDownloadBackground (#2773)

* coding sessionDownloadBackground

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* new build

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* fix

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Improvements from NextcloudKit

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Media tab bar select (#2771)

* fix

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Networking (#2774)

* cod

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* fix appear (#2779)

* fix

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* lint

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* Synchronization (#2781)



* improvements


---------

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* fix (#2782)

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Change Action sheet (#2766)

* WIP

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* Finish

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* PR

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* Add inset on top

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* Change line break

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* Change string

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* PR

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* PR

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* Fix context menu

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* Small fixes

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* Change icon

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

---------

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* GUI Improvements (#2784)

* preferredStatusBarStyle

---------

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Skip creation screen on creating new text file (#2783)

* Remove file upload screen for text files

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* Refactor

* Add loading indicator to NC Viewers

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* WIP

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* cod

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* cod

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* WIP

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* fix

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* PR

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* PR

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* PR

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* PR

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* PR

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

---------

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>
Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Co-authored-by: Marino Faggiana <marino@marinofaggiana.com>

* Varie fix (#2785)



Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>
Co-authored-by: Milen Pivchev <milen.pivchev@gmail.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* fix / improvements (#2788)

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* build 2

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* Sync upd (#2790)

* synchronization

---------

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* Sync advanced (#2791)

* refactoring

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* #2734

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix (#2792)

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* Improvement transfer (#2794)

* log

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* cod

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* remove NCNetworking.shared.cancelDataTask

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* sync only 3 time for day

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* lint

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* fix (#2795)

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Share extension improvements (#2796)


Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* https://github.com/nextcloud/ios/issues/2793

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* fix localfile

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

---------

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* welcome Hydrogen

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* fix

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* cod (#2797)

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* fix

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* build 5

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* fix

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* Tab bar - fixes (#2799)

* Disable select on empty items

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* Disable select in trash

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* Finish

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* Change strings

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

---------

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* Select fixes (#2803)

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* New build

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix (#2804)

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* new build, clean code

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Account switcher redesign (#2800)

* New account switcher

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* Remove darkening of image

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* Replace deprecated part with non

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* Revert

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* Name changes

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* Account check

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* Fix deprecation

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

---------

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* Media - layout (#2806)


* Layout ratio h variable

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Varie improvements (media) (#2808)

* cacheImages

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* cleaning

* fix

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* fix

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* fix

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* cleaning code

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* improved

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* improved cache

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Build 2

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Improved cache

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* build 3

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Refactory media (#2812)

* cod

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* add log

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* New icon

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* 2809 server e2ee version 12 not compatible plus serious internal error in end to end encryption (#2815)

* getMetadata v1 v2

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Media improvements (#2816)

* improvements

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Add account active check (#2817)

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* Description panel design adjustment + Option to hide (#2811)

---------

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* Media add old option layout (#2818)

* added option select layout

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* createMediaCache / delete media - fix

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Remove comments

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* cleaning

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* new build

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Build 5 - new DB version - getSizePreview

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* NextcloudKit 2.9.7

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* E2ee fix (#2820)

* fix

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* build 6

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

---------

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Varius fix (#2822)

* fix no transfer view

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* createMediaCacheWithAccount

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* https://github.com/nextcloud/ios/issues/2801

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* fix

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

---------

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* fix I10n

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* E2ee migration fix (#2824)

* added version

---------

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* build 7

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* recoding addDirectory

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Grid view redesign (#2823)

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* fix border preview documents

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* fix border preview documents

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* fix

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* fix download

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* cleaning

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* added test searchMediaUI

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* revert

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* UI media enh (#2828)


Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* fix 1.2 compatibility e2ee

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* cleaning

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* cleaning

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* build 8

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Improvements varie (#2830)

* more log info

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* fix ?

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

---------

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* new Animation

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* added Task cancel sessionDownloadBackground (#2832)

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* UIMenu reloading fix (#2831)

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>

* build 9

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* Fix(l10n): Update translations from Transifex

Signed-off-by: Nextcloud bot <bot@nextcloud.com>

* deleteAppPassword (#2836)

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

* Varie (#2835)



---------

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>

---------

Signed-off-by: Nextcloud bot <bot@nextcloud.com>
Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>
Signed-off-by: rakekniven <2069590+rakekniven@users.noreply.github.com>
Co-authored-by: Nextcloud bot <bot@nextcloud.com>
Co-authored-by: Milen Pivchev <milen.pivchev@gmail.com>
Co-authored-by: rakekniven <2069590+rakekniven@users.noreply.github.com>
This commit is contained in:
Marino Faggiana 2024-03-11 13:46:55 +01:00 коммит произвёл GitHub
Родитель 62c79619fc
Коммит f4c65b185c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
24 изменённых файлов: 153 добавлений и 139 удалений

Просмотреть файл

@ -4991,7 +4991,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 9;
CURRENT_PROJECT_VERSION = 0;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = NKUJUXUJ3B;
ENABLE_STRICT_OBJC_MSGSEND = YES;
@ -5017,7 +5017,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 5.2.0;
MARKETING_VERSION = 5.2.1;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "";
SDKROOT = iphoneos;
@ -5056,7 +5056,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 9;
CURRENT_PROJECT_VERSION = 0;
DEVELOPMENT_TEAM = NKUJUXUJ3B;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
@ -5079,7 +5079,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 5.2.0;
MARKETING_VERSION = 5.2.1;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "";
SDKROOT = iphoneos;
@ -5371,7 +5371,7 @@
repositoryURL = "https://github.com/nextcloud/NextcloudKit";
requirement = {
kind = exactVersion;
version = 2.9.7;
version = 2.9.8;
};
};
F788ECC5263AAAF900ADC67F /* XCRemoteSwiftPackageReference "MarkdownKit" */ = {

Просмотреть файл

@ -70,16 +70,14 @@ extension NCShareExtension {
func loadFolder() {
networkInProgress = true
collectionView.reloadData()
NCNetworking.shared.readFolder(serverUrl: serverUrl, account: activeAccount.account) { _, metadataFolder, _, _, _, error in
NCNetworking.shared.readFolder(serverUrl: serverUrl, account: activeAccount.account) { task in
self.dataSourceTask = task
self.collectionView.reloadData()
} completion: { _, metadataFolder, _, _, _, error in
DispatchQueue.main.async {
if error != .success {
self.showAlert(description: error.errorDescription)
}
self.networkInProgress = false
self.metadataFolder = metadataFolder
self.reloadDatasource(withLoadFolder: false)
}

Просмотреть файл

@ -29,7 +29,7 @@ extension NCShareExtension: NCEmptyDataSetDelegate, NCAccountRequestDelegate {
func emptyDataSetView(_ view: NCEmptyView) {
if networkInProgress {
if self.dataSourceTask?.state == .running {
view.emptyImage.image = UIImage(named: "networkInProgress")?.image(color: .gray, size: UIScreen.main.bounds.width)
view.emptyTitle.text = NSLocalizedString("_request_in_progress_", comment: "")
view.emptyDescription.text = ""

Просмотреть файл

@ -57,7 +57,7 @@ class NCShareExtension: UIViewController {
var emptyDataSet: NCEmptyDataSet?
let keyLayout = NCGlobal.shared.layoutViewShareExtension
var metadataFolder: tableMetadata?
var networkInProgress = false
var dataSourceTask: URLSessionTask?
var dataSource = NCDataSource()
var layoutForView: NCDBLayoutForView?
let heightRowTableView: CGFloat = 50

Просмотреть файл

@ -639,6 +639,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
NCPushNotification.shared().unsubscribingNextcloudServerPushNotification(account.account, urlBase: account.urlBase, user: account.user, withSubscribing: false)
}
NextcloudKit.shared.deleteAppPassword(serverUrl: urlBase, username: userId, password: password) { _, error in
print(error)
}
let results = NCManageDatabase.shared.getTableLocalFiles(predicate: NSPredicate(format: "account == %@", account), sorted: "ocId", ascending: false)
let utilityFileSystem = NCUtilityFileSystem()
for result in results {

Просмотреть файл

@ -76,9 +76,10 @@ class NCFavorite: NCCollectionViewCommon {
override func reloadDataSourceNetwork() {
super.reloadDataSourceNetwork()
NextcloudKit.shared.listingFavorites(showHiddenFiles: NCKeychain().showHiddenFiles,
options: NKRequestOptions(queue: NextcloudKit.shared.nkCommonInstance.backgroundQueue)) { account, files, _, error in
NextcloudKit.shared.listingFavorites(showHiddenFiles: NCKeychain().showHiddenFiles, options: NKRequestOptions(queue: NextcloudKit.shared.nkCommonInstance.backgroundQueue)) { task in
self.dataSourceTask = task
self.collectionView.reloadData()
} completion: { account, files, _, error in
if error == .success {
NCManageDatabase.shared.convertFilesToMetadatas(files, useMetadataFolder: false) { _, _, metadatas in
NCManageDatabase.shared.updateMetadatasFavorite(account: account, metadatas: metadatas)

Просмотреть файл

@ -180,8 +180,10 @@ class NCFiles: NCCollectionViewCommon {
var tableDirectory: tableDirectory?
NCNetworking.shared.readFile(serverUrlFileName: serverUrl) { account, metadataFolder, error in
NCNetworking.shared.readFile(serverUrlFileName: serverUrl) { task in
self.dataSourceTask = task
self.collectionView.reloadData()
} completion: { account, metadataFolder, error in
guard error == .success, let metadataFolder else {
return completion(nil, nil, 0, false, error)
}
@ -193,7 +195,10 @@ class NCFiles: NCCollectionViewCommon {
if tableDirectory?.etag != metadataFolder.etag || metadataFolder.e2eEncrypted {
NCNetworking.shared.readFolder(serverUrl: self.serverUrl,
account: self.appDelegate.account,
forceReplaceMetadatas: forceReplaceMetadatas) { _, metadataFolder, metadatas, metadatasChangedCount, metadatasChanged, error in
forceReplaceMetadatas: forceReplaceMetadatas) { task in
self.dataSourceTask = task
self.collectionView.reloadData()
} completion: { _, metadataFolder, metadatas, metadatasChangedCount, metadatasChanged, error in
guard error == .success else {
return completion(tableDirectory, nil, 0, false, error)
}

Просмотреть файл

@ -79,8 +79,10 @@ class NCGroupfolders: NCCollectionViewCommon {
let homeServerUrl = utilityFileSystem.getHomeServer(urlBase: self.appDelegate.urlBase, userId: self.appDelegate.userId)
NextcloudKit.shared.getGroupfolders(options: NKRequestOptions(queue: NextcloudKit.shared.nkCommonInstance.backgroundQueue)) { account, results, _, error in
NextcloudKit.shared.getGroupfolders(options: NKRequestOptions(queue: NextcloudKit.shared.nkCommonInstance.backgroundQueue)) { task in
self.dataSourceTask = task
self.collectionView.reloadData()
} completion: { account, results, _, error in
if error == .success, let groupfolders = results {
NCManageDatabase.shared.addGroupfolders(account: account, groupfolders: groupfolders)
Task {

Просмотреть файл

@ -57,20 +57,13 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
var isSearchingMode: Bool = false
var layoutForView: NCDBLayoutForView?
var selectableDataSource: [RealmSwiftObject] { dataSource.getMetadataSourceForAllSections() }
var dataSourceTask: URLSessionTask?
var groupByField = "name"
var providers: [NKSearchProvider]?
var searchResults: [NKSearchResult]?
var listLayout: NCListLayout!
var gridLayout: NCGridLayout!
var literalSearch: String?
var isReloadDataSourceNetworkInProgress: Bool = false {
didSet {
DispatchQueue.main.async {
self.setNavigationRightItems(enableMoreMenu: !self.isReloadDataSourceNetworkInProgress)
}
}
}
var tabBarSelect: NCSelectableViewTabBar?
var timerNotificationCenter: Timer?
@ -229,14 +222,14 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
navigationController?.navigationBar.prefersLargeTitles = true
navigationController?.setNavigationBarHidden(false, animated: true)
navigationController?.setNavigationBarAppearance()
setNavigationLeftItems()
setNavigationRightItems()
// FIXME: iPAD PDF landscape mode iOS 16
DispatchQueue.main.async {
self.collectionView?.collectionViewLayout.invalidateLayout()
}
setNavigationRightItems(enableMoreMenu: false)
}
override func viewWillDisappear(_ animated: Bool) {
@ -696,13 +689,13 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
self.emptyDataSet?.setOffset(getHeaderHeight())
if isSearchingMode {
view.emptyImage.image = UIImage(named: "search")?.image(color: .gray, size: UIScreen.main.bounds.width)
if isReloadDataSourceNetworkInProgress {
if self.dataSourceTask?.state == .running {
view.emptyTitle.text = NSLocalizedString("_search_in_progress_", comment: "")
} else {
view.emptyTitle.text = NSLocalizedString("_search_no_record_found_", comment: "")
}
view.emptyDescription.text = NSLocalizedString("_search_instruction_", comment: "")
} else if isReloadDataSourceNetworkInProgress {
} else if self.dataSourceTask?.state == .running {
view.emptyImage.image = UIImage(named: "networkInProgress")?.image(color: .gray, size: UIScreen.main.bounds.width)
view.emptyTitle.text = NSLocalizedString("_request_in_progress_", comment: "")
view.emptyDescription.text = ""
@ -910,17 +903,16 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
DispatchQueue.global().async {
if withQueryDB { self.queryDB() }
self.isReloadDataSourceNetworkInProgress = false
DispatchQueue.main.async {
self.refreshControl.endRefreshing()
self.collectionView.reloadData()
self.setNavigationRightItems()
}
}
}
@objc func reloadDataSourceNetwork() {
DispatchQueue.main.async {
self.isReloadDataSourceNetworkInProgress = true
self.collectionView?.reloadData()
}
}
@ -929,13 +921,15 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
guard !appDelegate.account.isEmpty, let literalSearch = literalSearch, !literalSearch.isEmpty
else { return self.refreshControl.endRefreshing() }
isReloadDataSourceNetworkInProgress = true
self.dataSource.clearDataSource()
self.refreshControl.beginRefreshing()
self.collectionView.reloadData()
if NCGlobal.shared.capabilityServerVersionMajor >= NCGlobal.shared.nextcloudVersion20 {
NCNetworking.shared.unifiedSearchFiles(userBaseUrl: appDelegate, literal: literalSearch) { _, searchProviders in
NCNetworking.shared.unifiedSearchFiles(userBaseUrl: appDelegate, literal: literalSearch) { task in
self.dataSourceTask = task
self.collectionView.reloadData()
} providers: { _, searchProviders in
self.providers = searchProviders
self.searchResults = []
self.dataSource = NCDataSource(
@ -952,11 +946,13 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
NCNetworking.shared.unifiedSearchQueue.addOperation(NCOperationUnifiedSearch(collectionViewCommon: self, metadatas: metadatas, searchResult: searchResult))
} completion: { _, _ in
self.refreshControl.endRefreshing()
self.isReloadDataSourceNetworkInProgress = false
self.collectionView.reloadData()
}
} else {
NCNetworking.shared.searchFiles(urlBase: appDelegate, literal: literalSearch) { metadatas, error in
NCNetworking.shared.searchFiles(urlBase: appDelegate, literal: literalSearch) { task in
self.dataSourceTask = task
self.collectionView.reloadData()
} completion: { metadatas, error in
DispatchQueue.main.async {
self.refreshControl.endRefreshing()
self.collectionView.reloadData()
@ -972,7 +968,6 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
groupByField: self.groupByField,
providers: self.providers,
searchResults: self.searchResults)
self.isReloadDataSourceNetworkInProgress = false
}
}
}
@ -984,7 +979,10 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
metadataForSection.unifiedSearchInProgress = true
self.collectionView?.reloadData()
NCNetworking.shared.unifiedSearchFilesProvider(userBaseUrl: appDelegate, id: lastSearchResult.id, term: term, limit: 5, cursor: cursor) { _, searchResult, metadatas, error in
NCNetworking.shared.unifiedSearchFilesProvider(userBaseUrl: appDelegate, id: lastSearchResult.id, term: term, limit: 5, cursor: cursor) { task in
self.dataSourceTask = task
self.collectionView.reloadData()
} completion: { _, searchResult, metadatas, error in
if error != .success {
NCContentPresenter().showError(error: error)
}
@ -1661,7 +1659,7 @@ extension NCCollectionViewCommon: EasyTipViewDelegate {
}
extension NCCollectionViewCommon: NCSelectableNavigationView, NCCollectionViewCommonSelectTabBarDelegate {
func setNavigationRightItems(enableMoreMenu: Bool = true) {
func setNavigationRightItems(enableMenu: Bool = false) {
var selectedMetadatas: [tableMetadata] = []
var isAnyOffline = false
var isAnyDirectory = false
@ -1715,24 +1713,20 @@ extension NCCollectionViewCommon: NCSelectableNavigationView, NCCollectionViewCo
if isEditMode {
tabBarSelect.show()
let select = UIBarButtonItem(title: NSLocalizedString("_cancel_", comment: ""), style: .done) { self.toggleSelect() }
navigationItem.rightBarButtonItems = [select]
} else {
tabBarSelect.hide()
let notification = UIBarButtonItem(image: .init(systemName: "bell"), style: .plain, action: tapNotification)
let menu = UIMenu(children: createMenuActions())
let menuButton = UIBarButtonItem(image: .init(systemName: "ellipsis.circle"), menu: menu)
menuButton.isEnabled = enableMoreMenu
if layoutKey == NCGlobal.shared.layoutViewFiles {
navigationItem.rightBarButtonItems = [menuButton, notification]
if navigationItem.rightBarButtonItems == nil || enableMenu {
let menuButton = UIBarButtonItem(image: .init(systemName: "ellipsis.circle"), menu: UIMenu(children: createMenuActions()))
if layoutKey == NCGlobal.shared.layoutViewFiles {
let notification = UIBarButtonItem(image: .init(systemName: "bell"), style: .plain, action: tapNotification)
navigationItem.rightBarButtonItems = [menuButton, notification]
} else {
navigationItem.rightBarButtonItems = [menuButton]
}
} else {
navigationItem.rightBarButtonItems = [menuButton]
navigationItem.rightBarButtonItems?.first?.menu = navigationItem.rightBarButtonItems?.first?.menu?.replacingChildren(createMenuActions())
}
}
}

Просмотреть файл

@ -43,7 +43,6 @@ class NCCollectionViewCommonSelectTabBar: NCSelectableViewTabBar, ObservableObje
guard let tabBarController, let hostingController else { return }
tabBarController.view.addSubview(hostingController.view)
hostingController.view.frame = tabBarController.tabBar.frame

Просмотреть файл

@ -55,7 +55,7 @@ protocol NCSelectableNavigationView: AnyObject {
func reloadDataSource(withQueryDB: Bool)
func setNavigationLeftItems()
func setNavigationRightItems(enableMoreMenu: Bool)
func setNavigationRightItems(enableMenu: Bool)
func createMenuActions() -> [UIMenuElement]
func toggleSelect(isOn: Bool?)
@ -70,7 +70,7 @@ extension NCSelectableNavigationView {
NCManageDatabase.shared.setLayoutForView(layoutForView: layoutForView)
NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterReloadDataSource)
setNavigationRightItems(enableMoreMenu: true)
setNavigationRightItems(enableMenu: false)
}
/// If explicit `isOn` is not set, it will invert `isEditMode`
@ -80,7 +80,7 @@ extension NCSelectableNavigationView {
self.selectOcId.removeAll()
self.selectIndexPath.removeAll()
self.setNavigationLeftItems()
self.setNavigationRightItems(enableMoreMenu: true)
self.setNavigationRightItems(enableMenu: true)
self.collectionView.reloadData()
}
}
@ -88,7 +88,7 @@ extension NCSelectableNavigationView {
func collectionViewSelectAll() {
selectOcId = selectableDataSource.compactMap({ $0.primaryKeyValue })
collectionView.reloadData()
setNavigationRightItems(enableMoreMenu: true)
setNavigationRightItems(enableMenu: false)
}
func tapNotification() {

Просмотреть файл

@ -35,13 +35,16 @@ extension NCNetworking {
func readFolder(serverUrl: String,
account: String,
forceReplaceMetadatas: Bool = false,
taskHandler: @escaping (_ task: URLSessionTask) -> Void = { _ in },
completion: @escaping (_ account: String, _ metadataFolder: tableMetadata?, _ metadatas: [tableMetadata]?, _ metadatasChangedCount: Int, _ metadatasChanged: Bool, _ error: NKError) -> Void) {
NextcloudKit.shared.readFileOrFolder(serverUrlFileName: serverUrl,
depth: "1",
showHiddenFiles: NCKeychain().showHiddenFiles,
includeHiddenFiles: NCGlobal.shared.includeHiddenFiles,
options: NKRequestOptions(queue: NextcloudKit.shared.nkCommonInstance.backgroundQueue)) { account, files, _, error in
options: NKRequestOptions(queue: NextcloudKit.shared.nkCommonInstance.backgroundQueue)) { task in
taskHandler(task)
} completion: { account, files, _, error in
guard error == .success else {
return completion(account, nil, nil, 0, false, error)
@ -86,11 +89,14 @@ extension NCNetworking {
func readFile(serverUrlFileName: String,
showHiddenFiles: Bool = NCKeychain().showHiddenFiles,
queue: DispatchQueue = NextcloudKit.shared.nkCommonInstance.backgroundQueue,
taskHandler: @escaping (_ task: URLSessionTask) -> Void = { _ in },
completion: @escaping (_ account: String, _ metadata: tableMetadata?, _ error: NKError) -> Void) {
let options = NKRequestOptions(queue: queue)
NextcloudKit.shared.readFileOrFolder(serverUrlFileName: serverUrlFileName, depth: "0", showHiddenFiles: showHiddenFiles, options: options) { account, files, _, error in
NextcloudKit.shared.readFileOrFolder(serverUrlFileName: serverUrlFileName, depth: "0", showHiddenFiles: showHiddenFiles, options: options) { task in
taskHandler(task)
} completion: { account, files, _, error in
guard error == .success, files.count == 1, let file = files.first else {
completion(account, nil, error)
return
@ -731,13 +737,16 @@ extension NCNetworking {
/// WebDAV search
func searchFiles(urlBase: NCUserBaseUrl,
literal: String,
taskHandler: @escaping (_ task: URLSessionTask) -> Void = { _ in },
completion: @escaping (_ metadatas: [tableMetadata]?, _ error: NKError) -> Void) {
NextcloudKit.shared.searchLiteral(serverUrl: urlBase.urlBase,
depth: "infinity",
literal: literal,
showHiddenFiles: NCKeychain().showHiddenFiles,
options: NKRequestOptions(queue: NextcloudKit.shared.nkCommonInstance.backgroundQueue)) { account, files, _, error in
options: NKRequestOptions(queue: NextcloudKit.shared.nkCommonInstance.backgroundQueue)) { task in
taskHandler(task)
} completion: { account, files, _, error in
guard error == .success else {
return completion(nil, error)
@ -762,6 +771,7 @@ extension NCNetworking {
///
func unifiedSearchFiles(userBaseUrl: NCUserBaseUrl,
literal: String,
taskHandler: @escaping (_ task: URLSessionTask) -> Void = { _ in },
providers: @escaping (_ accout: String, _ searchProviders: [NKSearchProvider]?) -> Void,
update: @escaping (_ account: String, _ id: String, NKSearchResult?, [tableMetadata]?) -> Void,
completion: @escaping (_ account: String, _ error: NKError) -> Void) {
@ -780,6 +790,8 @@ extension NCNetworking {
if let request = request {
self.requestsUnifiedSearch.append(request)
}
} taskHandler: { task in
taskHandler(task)
} providers: { account, searchProviders in
providers(account, searchProviders)
} update: { account, partialResult, provider, _ in
@ -838,11 +850,14 @@ extension NCNetworking {
func unifiedSearchFilesProvider(userBaseUrl: NCUserBaseUrl,
id: String, term: String,
limit: Int, cursor: Int,
taskHandler: @escaping (_ task: URLSessionTask) -> Void = { _ in },
completion: @escaping (_ account: String, _ searchResult: NKSearchResult?, _ metadatas: [tableMetadata]?, _ error: NKError) -> Void) {
var metadatas: [tableMetadata] = []
let request = NextcloudKit.shared.searchProvider(id, account: userBaseUrl.account, term: term, limit: limit, cursor: cursor, timeout: 60) { account, searchResult, _, error in
let request = NextcloudKit.shared.searchProvider(id, account: userBaseUrl.account, term: term, limit: limit, cursor: cursor, timeout: 60) { task in
taskHandler(task)
} completion: { account, searchResult, _, error in
guard let searchResult = searchResult else {
completion(account, nil, metadatas, error)
return

Просмотреть файл

@ -34,7 +34,7 @@ class NCNotification: UITableViewController, NCNotificationCellDelegate, NCEmpty
let utility = NCUtility()
var notifications: [NKNotifications] = []
var emptyDataSet: NCEmptyDataSet?
var isReloadDataSourceNetworkInProgress: Bool = false
var dataSourceTask: URLSessionTask?
// MARK: - View Life Cycle
@ -79,7 +79,7 @@ class NCNotification: UITableViewController, NCNotificationCellDelegate, NCEmpty
func emptyDataSetView(_ view: NCEmptyView) {
if isReloadDataSourceNetworkInProgress {
if self.dataSourceTask?.state == .running {
view.emptyImage.image = UIImage(named: "networkInProgress")?.image(color: .gray, size: UIScreen.main.bounds.width)
view.emptyTitle.text = NSLocalizedString("_request_in_progress_", comment: "")
view.emptyDescription.text = ""
@ -302,26 +302,26 @@ class NCNotification: UITableViewController, NCNotificationCellDelegate, NCEmpty
@objc func getNetwokingNotification() {
isReloadDataSourceNetworkInProgress = true
self.tableView.reloadData()
NextcloudKit.shared.getNotifications { account, notifications, _, error in
if error == .success && account == self.appDelegate.account {
self.notifications.removeAll()
let sortedListOfNotifications = (notifications! as NSArray).sortedArray(using: [NSSortDescriptor(key: "date", ascending: false)])
for notification in sortedListOfNotifications {
if let icon = (notification as? NKNotifications)?.icon {
self.utility.convertSVGtoPNGWriteToUserData(svgUrlString: icon, fileName: nil, width: 25, rewrite: false, account: self.appDelegate.account, completion: { _, _ in })
}
if let notification = (notification as? NKNotifications) {
self.notifications.append(notification)
}
}
self.refreshControl?.endRefreshing()
self.isReloadDataSourceNetworkInProgress = false
self.tableView.reloadData()
}
}
self.tableView.reloadData()
NextcloudKit.shared.getNotifications { task in
self.dataSourceTask = task
self.tableView.reloadData()
} completion: { account, notifications, _, error in
if error == .success && account == self.appDelegate.account {
self.notifications.removeAll()
let sortedListOfNotifications = (notifications! as NSArray).sortedArray(using: [NSSortDescriptor(key: "date", ascending: false)])
for notification in sortedListOfNotifications {
if let icon = (notification as? NKNotifications)?.icon {
self.utility.convertSVGtoPNGWriteToUserData(svgUrlString: icon, fileName: nil, width: 25, rewrite: false, account: self.appDelegate.account, completion: { _, _ in })
}
if let notification = (notification as? NKNotifications) {
self.notifications.append(notification)
}
}
self.refreshControl?.endRefreshing()
self.tableView.reloadData()
}
}
}
}

Просмотреть файл

@ -83,7 +83,6 @@ class NCOffline: NCCollectionViewCommon {
override func reloadDataSourceNetwork() {
super.reloadDataSourceNetwork()
reloadDataSource()
}
}

Просмотреть файл

@ -107,12 +107,14 @@
NSString *proxyServerPath = [NCBrandOptions shared].pushNotificationServerProxy;
NKRequestOptions *options = [[NKRequestOptions alloc] initWithEndpoint:nil version:nil customHeader:nil customUserAgent:nil contentType:nil e2eToken:nil timeout:60 queue:dispatch_get_main_queue()];
[[NextcloudKit shared] subscribingPushNotificationWithServerUrl:urlBase account:account user:user password:[[[NCKeychain alloc] init] getPasswordWithAccount:account] pushTokenHash:pushTokenHash devicePublicKey:pushDevicePublicKey proxyServerUrl:proxyServerPath options:options completion:^(NSString *account, NSString *deviceIdentifier, NSString *signature, NSString *publicKey, NSData *data, NKError *error) {
[[NextcloudKit shared] subscribingPushNotificationWithServerUrl:urlBase account:account user:user password:[[[NCKeychain alloc] init] getPasswordWithAccount:account] pushTokenHash:pushTokenHash devicePublicKey:pushDevicePublicKey proxyServerUrl:proxyServerPath options:options taskHandler:^(NSURLSessionTask *task) {
} completion:^(NSString *account, NSString *deviceIdentifier, NSString *signature, NSString *publicKey, NSData *data, NKError *error) {
if (error == NKError.success) {
NSString *userAgent = [NSString stringWithFormat:@"%@ (Strict VoIP)", [[NCBrandOptions shared] getUserAgent]];
NKRequestOptions *options = [[NKRequestOptions alloc] initWithEndpoint:nil version:nil customHeader:nil customUserAgent:userAgent contentType:nil e2eToken:nil timeout:60 queue:dispatch_get_main_queue()];
[[NextcloudKit shared] subscribingPushProxyWithProxyServerUrl:proxyServerPath pushToken:self.pushKitToken deviceIdentifier:deviceIdentifier signature:signature publicKey:publicKey options:options completion:^(NKError *error) {
[[NextcloudKit shared] subscribingPushProxyWithProxyServerUrl:proxyServerPath pushToken:self.pushKitToken deviceIdentifier:deviceIdentifier signature:signature publicKey:publicKey options:options taskHandler:^(NSURLSessionTask *task) {
} completion:^(NKError *error) {
if (error == NKError.success) {
[[[NextcloudKit shared] nkCommonInstance] writeLog:@"[INFO] Subscribed to Push Notification server & proxy successfully"];
@ -136,13 +138,15 @@
NSString *publicKey = [[[NCKeychain alloc] init] getPushNotificationSubscribingPublicKeyWithAccount:account];
NKRequestOptions *options = [[NKRequestOptions alloc] initWithEndpoint:nil version:nil customHeader:nil customUserAgent:nil contentType:nil e2eToken:nil timeout:60 queue:dispatch_get_main_queue()];
[[NextcloudKit shared] unsubscribingPushNotificationWithServerUrl:urlBase account:account user:user password:[[[NCKeychain alloc] init] getPasswordWithAccount:account] options:options completion:^(NSString *account, NKError *error) {
[[NextcloudKit shared] unsubscribingPushNotificationWithServerUrl:urlBase account:account user:user password:[[[NCKeychain alloc] init] getPasswordWithAccount:account] options:options taskHandler:^(NSURLSessionTask *task) {
} completion:^(NSString *account, NKError *error) {
if (error == NKError.success) {
NSString *proxyServerPath = [NCBrandOptions shared].pushNotificationServerProxy;
NSString *userAgent = [NSString stringWithFormat:@"%@ (Strict VoIP)", [[NCBrandOptions shared] getUserAgent]];
NKRequestOptions *options = [[NKRequestOptions alloc] initWithEndpoint:nil version:nil customHeader:nil customUserAgent:userAgent contentType:nil e2eToken:nil timeout:60 queue:dispatch_get_main_queue()];
[[NextcloudKit shared] unsubscribingPushProxyWithProxyServerUrl:proxyServerPath deviceIdentifier:deviceIdentifier signature:signature publicKey:publicKey options:options completion:^(NKError *error) {
[[NextcloudKit shared] unsubscribingPushProxyWithProxyServerUrl:proxyServerPath deviceIdentifier:deviceIdentifier signature:signature publicKey:publicKey options:options taskHandler:^(NSURLSessionTask *task) {
} completion:^(NKError *error) {
if (error == NKError.success) {
[[[NextcloudKit shared] nkCommonInstance] writeLog:@"[INFO] Unsubscribed to Push Notification server & proxy successfully."];

Просмотреть файл

@ -135,8 +135,10 @@ class NCRecent: NCCollectionViewCommon {
NextcloudKit.shared.searchBodyRequest(serverUrl: appDelegate.urlBase,
requestBody: requestBody,
showHiddenFiles: NCKeychain().showHiddenFiles,
options: NKRequestOptions(queue: NextcloudKit.shared.nkCommonInstance.backgroundQueue)) { account, files, _, error in
options: NKRequestOptions(queue: NextcloudKit.shared.nkCommonInstance.backgroundQueue)) { task in
self.dataSourceTask = task
self.collectionView.reloadData()
} completion: { account, files, _, error in
if error == .success {
NCManageDatabase.shared.convertFilesToMetadatas(files, useMetadataFolder: false) { _, metadatasFolder, metadatas in
// Update sub directories

Просмотреть файл

@ -62,7 +62,8 @@ import MarkdownKit
super.viewWillAppear(animated)
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
NCNetworking.shared.readFile(serverUrlFileName: self.serverUrl, queue: .main) { account, metadata, error in
NCNetworking.shared.readFile(serverUrlFileName: self.serverUrl, queue: .main) { _ in
} completion: { account, metadata, error in
if error == .success, account == self.appDelegate.account, let metadata {
NCManageDatabase.shared.setDirectory(serverUrl: self.serverUrl, richWorkspace: metadata.richWorkspace, account: account)
if self.richWorkspaceText != metadata.richWorkspace, metadata.richWorkspace != nil {

Просмотреть файл

@ -62,24 +62,17 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, UIAdaptivePresent
var serverUrl = ""
// -------------------------------------------------------------
private var dataSourceTask: URLSessionTask?
private var emptyDataSet: NCEmptyDataSet?
private var serverUrlPush = ""
private var metadataFolder = tableMetadata()
private var networkInProgress = false
private var overwrite = true
private var dataSource = NCDataSource()
internal var richWorkspaceText: String?
internal var headerMenu: NCSectionHeaderMenu?
private var autoUploadFileName = ""
private var autoUploadDirectory = ""
private var backgroundImageView = UIImageView()
private var activeAccount: tableAccount!
private let window = UIApplication.shared.connectedScenes.flatMap { ($0 as? UIWindowScene)?.windows ?? [] }.first { $0.isKeyWindow }
@ -202,7 +195,7 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, UIAdaptivePresent
func emptyDataSetView(_ view: NCEmptyView) {
if networkInProgress {
if self.dataSourceTask?.state == .running {
view.emptyImage.image = UIImage(named: "networkInProgress")?.image(color: .gray, size: UIScreen.main.bounds.width)
view.emptyTitle.text = NSLocalizedString("_request_in_progress_", comment: "")
view.emptyDescription.text = ""
@ -561,14 +554,13 @@ extension NCSelect {
func loadFolder() {
networkInProgress = true
collectionView.reloadData()
NCNetworking.shared.readFolder(serverUrl: serverUrl, account: activeAccount.account) { _, _, _, _, _, error in
NCNetworking.shared.readFolder(serverUrl: serverUrl, account: activeAccount.account) { task in
self.dataSourceTask = task
self.collectionView.reloadData()
} completion: { _, _, _, _, _, error in
if error != .success {
NCContentPresenter().showError(error: error)
}
self.networkInProgress = false
self.loadDatasource(withLoadFolder: false)
}
}

Просмотреть файл

@ -80,7 +80,10 @@ class NCShares: NCCollectionViewCommon {
}
} else {
let serverUrlFileName = share.serverUrl + "/" + share.fileName
NCNetworking.shared.readFile(serverUrlFileName: serverUrlFileName) { _, metadata, _ in
NCNetworking.shared.readFile(serverUrlFileName: serverUrlFileName) { task in
self.dataSourceTask = task
self.collectionView.reloadData()
} completion: { _, metadata, _ in
if let metadata {
NCManageDatabase.shared.addMetadata(metadata)
if !(metadatas.contains { $0.ocId == metadata.ocId }) {
@ -98,8 +101,10 @@ class NCShares: NCCollectionViewCommon {
override func reloadDataSourceNetwork() {
super.reloadDataSourceNetwork()
NextcloudKit.shared.readShares(parameters: NKShareParameter()) { account, shares, _, error in
NextcloudKit.shared.readShares(parameters: NKShareParameter()) { task in
self.dataSourceTask = task
self.collectionView.reloadData()
} completion: { account, shares, _, error in
if error == .success {
NCManageDatabase.shared.deleteTableShare(account: account)
if let shares = shares, !shares.isEmpty {

Двоичный файл не отображается.

Просмотреть файл

@ -55,9 +55,7 @@ extension NCTrash: UICollectionViewDataSource {
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
emptyDataSet?.numberOfItemsInSection(datasource.count, section: section)
setNavigationRightItems()
return datasource.count
}

Просмотреть файл

@ -36,16 +36,14 @@ class NCTrash: UIViewController, NCTrashListCellDelegate, NCEmptyDataSetDelegate
var blinkFileId: String?
var emptyDataSet: NCEmptyDataSet?
var selectableDataSource: [RealmSwiftObject] { datasource }
var dataSourceTask: URLSessionTask?
let appDelegate = (UIApplication.shared.delegate as? AppDelegate)!
let utilityFileSystem = NCUtilityFileSystem()
let utility = NCUtility()
var isEditMode = false
var selectOcId: [String] = []
var selectIndexPath: [IndexPath] = []
var tabBarSelect: NCSelectableViewTabBar?
var datasource: [tableTrash] = []
var layoutForView: NCDBLayoutForView?
var listLayout: NCListLayout!
@ -228,18 +226,17 @@ extension NCTrash {
@objc func loadListingTrash() {
NextcloudKit.shared.listingTrash(showHiddenFiles: false) { account, items, _, error in
NextcloudKit.shared.listingTrash(showHiddenFiles: false) { task in
self.dataSourceTask = task
self.collectionView.reloadData()
} completion: { account, items, _, error in
DispatchQueue.main.async { self.refreshControl.endRefreshing() }
guard error == .success, account == self.appDelegate.account, let trashPath = self.getTrashPath() else {
NCContentPresenter().showError(error: error)
return
}
NCManageDatabase.shared.deleteTrash(filePath: trashPath, account: self.appDelegate.account)
NCManageDatabase.shared.addTrash(account: account, items: items)
self.reloadDataSource()
}
}
@ -324,24 +321,19 @@ extension NCTrash: NCSelectableNavigationView, NCTrashSelectTabBarDelegate {
""
}
func setNavigationRightItems(enableMoreMenu: Bool = true) {
func setNavigationRightItems(enableMenu: Bool = false) {
guard let tabBarSelect = tabBarSelect as? NCTrashSelectTabBar else { return }
tabBarSelect.isSelectedEmpty = selectOcId.isEmpty
if isEditMode {
tabBarSelect.show()
let select = UIBarButtonItem(title: NSLocalizedString("_cancel_", comment: ""), style: .done) { self.toggleSelect() }
navigationItem.rightBarButtonItems = [select]
} else {
tabBarSelect.hide()
let menu = UIMenu(children: createMenuActions())
let menuButton = UIBarButtonItem(image: .init(systemName: "ellipsis.circle"), menu: menu)
menuButton.isEnabled = enableMoreMenu
menuButton.isEnabled = true
navigationItem.rightBarButtonItems = [menuButton]
}
}

Просмотреть файл

@ -374,11 +374,13 @@ class NCViewerMediaPage: UIViewController {
return
}
metadatas[index] = metadata
if currentViewController.metadata.ocId == ocId {
currentViewController.loadImage()
} else {
modifiedOcId.append(ocId)
DispatchQueue.main.async {
self.metadatas[index] = metadata
if self.currentViewController.metadata.ocId == ocId {
self.currentViewController.loadImage()
} else {
self.modifiedOcId.append(ocId)
}
}
}

Просмотреть файл

@ -334,12 +334,13 @@ class NCViewerPDF: UIViewController, NCViewerPDFSearchDelegate {
return
}
NCActivityIndicator.shared.stop()
if error == .success {
pdfDocument = PDFDocument(url: URL(fileURLWithPath: filePath))
pdfView.document = pdfDocument
pdfView.layoutDocumentView()
DispatchQueue.main.async {
NCActivityIndicator.shared.stop()
if error == .success {
self.pdfDocument = PDFDocument(url: URL(fileURLWithPath: self.filePath))
self.pdfView.document = self.pdfDocument
self.pdfView.layoutDocumentView()
}
}
}