Skip to content

Commit

Permalink
[feature/localsearch] Local account-wide search using custom queries (#…
Browse files Browse the repository at this point in the history
…933)

* Port changes from feature/globalsearch to milestone/11.6

* - clean up QueryFileListTableViewController.swift
- replace all/folder text in scope selection with icons on iOS 13+

* - SortMethod
	- turn localizedName from a function into a property
	- add sortPropertyName to simplify construction of custom OCQuerys
- ClientQueryViewController
	- add sort property, sort order and result limits to OCQueryCondition
	- refresh search query when changing sort order and peak results

* - UIView+Extension: add simply methods to start/stop a pulsing effect on a view
- ServerListTableViewController
	- add user activity to allow state restoring to server list (previously only *always* to the last opened bookmark)
	- remove auto login code for pre-iOS 13 (in iOS 13 that's handled by scene/state restoration)
	- add inline status reporting for database migrations
- SceneDelegate: add support to state restore to server list
- ClientQueryViewController
	- switch to search tokenizer to construct OCQueryCondition
	- make sure sort / search options are no longer hidden when showing large "No results" message
- ClientRootViewController
	- add support for migration progress reporting / OCCoreBusyStatusHandler passing
	- fix OCFileProviderServiceStandby leak if OCCoreManager returns a request with an error
- FileProvider extension
	- return an error when trying to access an account whose database needs migration
	- handle case where no OCCore is available
- MessageView: add option to show messages with insets at the edges
- NSDate+ComputedTimes:
	- simplified computation of beginning of days, weeks, months and years, with support for offsets
	- add unit test
- OCQueryCondition+SearchSegmenter:
	- segmentation of search queries into terms and "keywords"
	- supports placing terms in "" as well as unclosed "
	- keyword support to filter for:
		- files (:file), folders (:folder),
		- images (:image), video (:video)
		- time frames (:today, :week, :month, :year)
		- dynamic time frames (:7d, :2w, :1m, :1y, days:7, weeks:2, month:1, year:1, …)
		- file types/suffixes (type:jpg)
	- add unit test

* - add "Show more results" row at the end of the search result list if there could be more results

* - Cleanup more cell identifiers

* - QueryFileListTableViewController: search remains active after choosing an item and then navigating back to search
- ClientQueryViewController: adapt to QueryFileListTableViewController changes

* SDK update to fix OCCore stop bug

* - BreadCrumbTableViewController
	- add navigationHandler property to allow custom navigation actions to get triggered by the breadcrumb view
- ClientItemCell
	- add reveal button support
- ClientQueryViewController / QueryFileListTableViewController
	- allow providing an item to reveal and highlight
	- allow specifying if bread crumbs should push new view controllers
	- show reveal arrows for custom queries

* - fix issue of stopped custom query after revealing an item and returning
- use search term segmentation also for folder search (via OCQueryCondition+Item)

* - OCBookmark+AppExtensions: check if displayName and userName have at least one character before using them

* - update SDK
- add concept and property of activeQuery to QueryFileListTableViewController
- adopt activeQuery in ClientQueryViewController to prevent QueryFileListTableViewController from controlling the customSearchQuery / run into conflicts
- resolve issue where a "Stopped" status was displayed sometimes when returning from a revealed search result

* - more differentiated status 503 handling (owncloud/enterprise#4476) via SDK update

* - NSDate+ComputedTimes
	- add date parsing for strings following [year]-[[month][-[day]]] syntax
	- clarify all other method names
- NSString+ByteCountParser: parse strings into byte counts, support TB, TiB, GB, GiB, MB, MiB, B and bytes-without-B
- OCQueryCondition+SearchSegmenter
	- add support for localized keywords in local search
	- clean up keywords, removing kind-of-duplicates
	- add new keywords:
		- after: return items last modified after the given date
		- before: return items last modified before the given date
		- on: return items last modified on the given date
		- smaller: return items less than this size
		- greater: return items greater than this size

* - Update SDK to fix Service Unavailable error handling

* - update SDK to add item sync info scrubbing capabilities
- address Xcode / linter warnings

* OCQueryCondition+SearchSegmenter:
- add full localization + normalization of keywords
- add English and German localization

* - update SDK
- remove leftover code

* - QueryFileListTableViewController: remove unneeded/conflicting searchScope initialization
- added missing localizations

* Code review suggestion for PR #933:
- hide multiselect button, when search is active
- use labels instead of images for search scope segmented control
- changed more button width for better UI alignment
- changed multiselect button width for better touch experience

* - change search field placeholder depending on selected scope

* - fixed showing and executing keyboard shortcuts when search is active in file list (was not shown, because action was not available in performing class)
- added "Toggle Search Scope" keyboard shortcut
- scroll file list to top, when search will be activated

* - comment out parts of KeyCommands that seem to interfere with entry of search text, jumping to entries with the letters instead
- scroll to top when results change
- add support for negating search terms by prefixing them with "-", i.e. "-word" to exclude results with "word" in it

* - disable keyboard shortcuts for letters, if search is active
- make search field first responder, when toggle search scope

* fixed search field cursor tint color

* - logging improvements: use OCFileOpLog to log file operation in OCCore+BundleImport.m
- update SDK

* - fix finding (1) in #933 via SDK update

* - fix misplaced sortbar (finding (3) in #933)

* - OCQueryCondition+SearchSegmenter: accept more possible quotation marks when segmenting searches

* OCQueryCondition+SearchSegmenter: allow inactivation of keywords through quotation, make it possible to still negate such searches

* - remove accidentally entered ":" that prevented compilation

* fixed QA finding (8): keyboard commands for search and sort order where missing in directory picker

* - SortBar: new allowMultiSelect property to control whether multi select should be available, defaulting to true
- QueryFileListTableViewController, ClientQueryViewController: allow efficient subclassing of relevant parts of the reveal feature
- ClientDirectoryPickerViewController: provide implementations of relevant reveal subclassing points, disable multi-select (fixing finding (7) and (9) in #933)

* - update SDK to add database support for ownerUserName
- search segmenter: add support for owner keyword, incl. localization

* fixed duplicated keyboard commands:
changed keyboard command for toggle search order and share item

* added changelog entry

* Calens changelog updated

Co-authored-by: Matthias Hühne <mhuehne@owncloud.com>
Co-authored-by: hosy <hosy@users.noreply.github.com>
  • Loading branch information
3 people authored Apr 20, 2021
1 parent 3599282 commit 288a1c2
Show file tree
Hide file tree
Showing 38 changed files with 1,820 additions and 214 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Summary
* Bugfix - Disable Markup Action for Mime-Type Gif: [#952](https://github.com/owncloud/ios-app/issues/952)
* Change - "Go to Page" reallocated in PDF previews: [#4448](https://github.com/owncloud/enterprise/issues/4448)
* Change - French Localization: [#4450](https://github.com/owncloud/enterprise/issues/4450)
* Change - Local account-wide search using custom queries: [#53](https://github.com/owncloud/ios-app/issues/53)
* Change - Presentation Mode: [#704](https://github.com/owncloud/ios-app/issues/704)
* Change - Shortcut uploads and error handling improvements: [#858](https://github.com/owncloud/ios-app/issues/858)
* Change - Added Actions to File Provider: Sharing & Public Links: [#910](https://github.com/owncloud/ios-app/pull/910)
Expand Down Expand Up @@ -76,6 +77,13 @@ Details

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

* Change - Local account-wide search using custom queries: [#53](https://github.com/owncloud/ios-app/issues/53)

User can switch between local folder or local account-wide search. Search terms and filter
keywords can be combined inside the search field to get granular search results.

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

* Change - Presentation Mode: [#704](https://github.com/owncloud/ios-app/issues/704)

Added an action in detail view menu which enables presentation mode. Presentation mode
Expand Down
6 changes: 6 additions & 0 deletions changelog/unreleased/53
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Change: Local account-wide search using custom queries

User can switch between local folder or local account-wide search.
Search terms and filter keywords can be combined inside the search field to get granular search results.

https://github.com/owncloud/ios-app/issues/53
2 changes: 1 addition & 1 deletion ios-sdk
69 changes: 55 additions & 14 deletions ownCloud File Provider/FileProviderExtension.m
Original file line number Diff line number Diff line change
Expand Up @@ -175,25 +175,44 @@ - (NSFileProviderItem)itemForIdentifier:(NSFileProviderItemIdentifier)identifier

OCSyncExec(itemRetrieval, {
// Resolve the given identifier to a record in the model
if ([identifier isEqual:NSFileProviderRootContainerItemIdentifier])
NSError *coreError = nil;
OCCore *core = [self coreWithError:&coreError];

if (core != nil)
{
// Root item
[self.core.vault.database retrieveCacheItemsAtPath:@"/" itemOnly:YES completionHandler:^(OCDatabase *db, NSError *error, OCSyncAnchor syncAnchor, NSArray<OCItem *> *items) {
item = items.firstObject;
returnError = error;
if (coreError != nil)
{
returnError = coreError;
}
else
{
if ([identifier isEqual:NSFileProviderRootContainerItemIdentifier])
{
// Root item
[self.core.vault.database retrieveCacheItemsAtPath:@"/" itemOnly:YES completionHandler:^(OCDatabase *db, NSError *error, OCSyncAnchor syncAnchor, NSArray<OCItem *> *items) {
item = items.firstObject;
returnError = error;

OCSyncExecDone(itemRetrieval);
}];
OCSyncExecDone(itemRetrieval);
}];
}
else
{
// Other item
[self.core retrieveItemFromDatabaseForLocalID:(OCLocalID)identifier completionHandler:^(NSError *error, OCSyncAnchor syncAnchor, OCItem *itemFromDatabase) {
item = itemFromDatabase;
returnError = error;

OCSyncExecDone(itemRetrieval);
}];
}
}
}
else
{
// Other item
[self.core retrieveItemFromDatabaseForLocalID:(OCLocalID)identifier completionHandler:^(NSError *error, OCSyncAnchor syncAnchor, OCItem *itemFromDatabase) {
item = itemFromDatabase;
returnError = error;
returnError = coreError;

OCSyncExecDone(itemRetrieval);
}];
OCSyncExecDone(itemRetrieval);
}
});

Expand Down Expand Up @@ -1001,11 +1020,17 @@ - (OCBookmark *)bookmark
}

- (OCCore *)core
{
return ([self coreWithError:nil]);
}

- (OCCore *)coreWithError:(NSError **)outError
{
OCLogDebug(@"FileProviderExtension[%p].core[enter]: _core=%p, bookmark=%@", self, _core, self.bookmark);

OCBookmark *bookmark = self.bookmark;
__block OCCore *retCore = nil;
__block NSError *retError = nil;

@synchronized(self)
{
Expand Down Expand Up @@ -1037,6 +1062,11 @@ - (OCCore *)core
retCore = self->_core;
}
}

if (error != nil)
{
retError = error;
}
} completionHandler:^(OCCore *core, NSError *error) {
if (!hasCore)
{
Expand All @@ -1052,6 +1082,12 @@ - (OCCore *)core
retCore = self->_core;
}

if (error != nil)
{
retError = error;
retCore = nil;
}

OCSyncExecDone(waitForCore);

if (hasCore)
Expand All @@ -1066,7 +1102,12 @@ - (OCCore *)core

if (retCore == nil)
{
OCLogError(@"Error getting core for domain %@ (UUID %@)", OCLogPrivate(self.domain.displayName), OCLogPrivate(self.domain.identifier));
OCLogError(@"Error getting core for domain %@ (UUID %@): %@", OCLogPrivate(self.domain.displayName), OCLogPrivate(self.domain.identifier), OCLogPrivate(retError));
}

if (outError != NULL)
{
*outError = retError;
}

OCLogDebug(@"FileProviderExtension[%p].core[leave]: _core=%p, bookmark=%@", self, retCore, bookmark);
Expand Down
28 changes: 28 additions & 0 deletions ownCloud.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,8 @@
DC68057A212EAB5E006C3B1F /* ThemeCertificateViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC680579212EAB5E006C3B1F /* ThemeCertificateViewController.swift */; };
DC6C68362574FD0400E46BD4 /* PLCrashReporter.LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = DC6C68352574FD0400E46BD4 /* PLCrashReporter.LICENSE */; };
DC6CF7FB219446050013B9F9 /* LogSettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC6CF7FA219446050013B9F9 /* LogSettingsViewController.swift */; };
DC70398526128B89009F2DC1 /* NSString+ByteCountParser.h in Headers */ = {isa = PBXBuildFile; fileRef = DC70398326128B89009F2DC1 /* NSString+ByteCountParser.h */; };
DC70398626128B89009F2DC1 /* NSString+ByteCountParser.m in Sources */ = {isa = PBXBuildFile; fileRef = DC70398426128B89009F2DC1 /* NSString+ByteCountParser.m */; };
DC774E5F22F44E57000B11A1 /* ZIPArchive.m in Sources */ = {isa = PBXBuildFile; fileRef = DC774E5D22F44E4A000B11A1 /* ZIPArchive.m */; };
DC774E6022F44E57000B11A1 /* ZIPArchive.h in Headers */ = {isa = PBXBuildFile; fileRef = DC774E5C22F44E4A000B11A1 /* ZIPArchive.h */; settings = {ATTRIBUTES = (Public, ); }; };
DC774E6322F44E6D000B11A1 /* OCCore+BundleImport.h in Headers */ = {isa = PBXBuildFile; fileRef = DC774E6122F44E6D000B11A1 /* OCCore+BundleImport.h */; settings = {ATTRIBUTES = (Public, ); }; };
Expand Down Expand Up @@ -368,6 +370,9 @@
DCAEB06121F9FC510067E147 /* EarlGrey+Tools.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCAEB06021F9FC510067E147 /* EarlGrey+Tools.swift */; };
DCB2C05F250C1F9E001083CA /* BrandingClassSettingsSource.h in Headers */ = {isa = PBXBuildFile; fileRef = DCB2C05D250C1F9E001083CA /* BrandingClassSettingsSource.h */; };
DCB2C061250C253C001083CA /* BrandingClassSettingsSource.m in Sources */ = {isa = PBXBuildFile; fileRef = DCB2C05E250C1F9E001083CA /* BrandingClassSettingsSource.m */; };
DCB458ED2604A7D4006A02AB /* OCQueryCondition+SearchSegmenter.h in Headers */ = {isa = PBXBuildFile; fileRef = DCB458EB2604A7D4006A02AB /* OCQueryCondition+SearchSegmenter.h */; settings = {ATTRIBUTES = (Public, ); }; };
DCB458EE2604A7D4006A02AB /* OCQueryCondition+SearchSegmenter.m in Sources */ = {isa = PBXBuildFile; fileRef = DCB458EC2604A7D4006A02AB /* OCQueryCondition+SearchSegmenter.m */; };
DCB459052604AD2A006A02AB /* SearchSegmentationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DCB459042604AD2A006A02AB /* SearchSegmentationTests.m */; };
DCB5D60B25FC14B6004C52D9 /* OCIssue+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCB5D60A25FC14B6004C52D9 /* OCIssue+Extension.swift */; };
DCB6C4D72453A6CA00C1EAE1 /* ClientAuthenticationUpdater.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCB6C4D62453A6CA00C1EAE1 /* ClientAuthenticationUpdater.swift */; };
DCB6C4DE24559B1600C1EAE1 /* ClientAuthenticationUpdaterViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCB6C4DD24559B1600C1EAE1 /* ClientAuthenticationUpdaterViewController.swift */; };
Expand Down Expand Up @@ -399,6 +404,8 @@
DCC83304242CF3AD00153F8C /* AlertViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCC83303242CF3AC00153F8C /* AlertViewController.swift */; };
DCC8535823CE1236007BA3EB /* LicenseInAppProductListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCC8535723CE1236007BA3EB /* LicenseInAppProductListViewController.swift */; };
DCC8536023CE1AF8007BA3EB /* PurchasesSettingsSection.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCC8535F23CE1AF8007BA3EB /* PurchasesSettingsSection.swift */; };
DCCD77792604C91600098573 /* NSDate+ComputedTimes.h in Headers */ = {isa = PBXBuildFile; fileRef = DCCD776A2604C81B00098573 /* NSDate+ComputedTimes.h */; settings = {ATTRIBUTES = (Public, ); }; };
DCCD778C2604C91B00098573 /* NSDate+ComputedTimes.m in Sources */ = {isa = PBXBuildFile; fileRef = DCCD776B2604C81B00098573 /* NSDate+ComputedTimes.m */; };
DCD1300A23A191C000255779 /* LicenseOfferButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCD1300923A191C000255779 /* LicenseOfferButton.swift */; };
DCD1301123A23F4E00255779 /* OCLicenseManager+AppStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCD1301023A23F4E00255779 /* OCLicenseManager+AppStore.swift */; };
DCD2D40622F06ECA0071FB8F /* DataSettingsSection.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCD2D40522F06ECA0071FB8F /* DataSettingsSection.swift */; };
Expand Down Expand Up @@ -1287,6 +1294,8 @@
DC680579212EAB5E006C3B1F /* ThemeCertificateViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThemeCertificateViewController.swift; sourceTree = "<group>"; };
DC6C68352574FD0400E46BD4 /* PLCrashReporter.LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = PLCrashReporter.LICENSE; sourceTree = "<group>"; };
DC6CF7FA219446050013B9F9 /* LogSettingsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogSettingsViewController.swift; sourceTree = "<group>"; };
DC70398326128B89009F2DC1 /* NSString+ByteCountParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSString+ByteCountParser.h"; sourceTree = "<group>"; };
DC70398426128B89009F2DC1 /* NSString+ByteCountParser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSString+ByteCountParser.m"; sourceTree = "<group>"; };
DC774E5C22F44E4A000B11A1 /* ZIPArchive.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZIPArchive.h; sourceTree = "<group>"; };
DC774E5D22F44E4A000B11A1 /* ZIPArchive.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZIPArchive.m; sourceTree = "<group>"; };
DC774E6122F44E6D000B11A1 /* OCCore+BundleImport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "OCCore+BundleImport.h"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1331,6 +1340,9 @@
DCB44D7C2186F0F600DAA4CC /* ThemeStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThemeStyle.swift; sourceTree = "<group>"; };
DCB44D842186FEF700DAA4CC /* ThemeStyle+DefaultStyles.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ThemeStyle+DefaultStyles.swift"; sourceTree = "<group>"; };
DCB44D86218718BA00DAA4CC /* VendorServices.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VendorServices.swift; sourceTree = "<group>"; };
DCB458EB2604A7D4006A02AB /* OCQueryCondition+SearchSegmenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "OCQueryCondition+SearchSegmenter.h"; sourceTree = "<group>"; };
DCB458EC2604A7D4006A02AB /* OCQueryCondition+SearchSegmenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "OCQueryCondition+SearchSegmenter.m"; sourceTree = "<group>"; };
DCB459042604AD2A006A02AB /* SearchSegmentationTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SearchSegmentationTests.m; sourceTree = "<group>"; };
DCB504D7221EF07E007638BE /* status-flash.tvg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "status-flash.tvg"; path = "img/filetypes-tvg/status-flash.tvg"; sourceTree = SOURCE_ROOT; };
DCB5D60A25FC14B6004C52D9 /* OCIssue+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "OCIssue+Extension.swift"; sourceTree = "<group>"; };
DCB6C4D62453A6CA00C1EAE1 /* ClientAuthenticationUpdater.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClientAuthenticationUpdater.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1367,6 +1379,8 @@
DCC83303242CF3AC00153F8C /* AlertViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertViewController.swift; sourceTree = "<group>"; };
DCC8535723CE1236007BA3EB /* LicenseInAppProductListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LicenseInAppProductListViewController.swift; sourceTree = "<group>"; };
DCC8535F23CE1AF8007BA3EB /* PurchasesSettingsSection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PurchasesSettingsSection.swift; sourceTree = "<group>"; };
DCCD776A2604C81B00098573 /* NSDate+ComputedTimes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSDate+ComputedTimes.h"; sourceTree = "<group>"; };
DCCD776B2604C81B00098573 /* NSDate+ComputedTimes.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSDate+ComputedTimes.m"; sourceTree = "<group>"; };
DCD1300923A191C000255779 /* LicenseOfferButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LicenseOfferButton.swift; sourceTree = "<group>"; };
DCD1301023A23F4E00255779 /* OCLicenseManager+AppStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "OCLicenseManager+AppStore.swift"; sourceTree = "<group>"; };
DCD2D40522F06ECA0071FB8F /* DataSettingsSection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataSettingsSection.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2399,6 +2413,8 @@
DC774E6122F44E6D000B11A1 /* OCCore+BundleImport.h */,
DC7C100F24B5F81E00227085 /* OCBookmark+AppExtensions.m */,
DC7C100E24B5F81E00227085 /* OCBookmark+AppExtensions.h */,
DCB458EC2604A7D4006A02AB /* OCQueryCondition+SearchSegmenter.m */,
DCB458EB2604A7D4006A02AB /* OCQueryCondition+SearchSegmenter.h */,
);
path = "SDK Extensions";
sourceTree = "<group>";
Expand Down Expand Up @@ -2650,6 +2666,7 @@
isa = PBXGroup;
children = (
DCC0856B2293F1FD008CC05C /* LicensingTests.m */,
DCB459042604AD2A006A02AB /* SearchSegmentationTests.m */,
DCC0856D2293F1FD008CC05C /* Info.plist */,
);
path = ownCloudAppFrameworkTests;
Expand All @@ -2660,6 +2677,10 @@
children = (
DCC5E445232654DE002E5B84 /* NSObject+AnnotatedProperties.m */,
DCC5E444232654DE002E5B84 /* NSObject+AnnotatedProperties.h */,
DCCD776B2604C81B00098573 /* NSDate+ComputedTimes.m */,
DCCD776A2604C81B00098573 /* NSDate+ComputedTimes.h */,
DC70398426128B89009F2DC1 /* NSString+ByteCountParser.m */,
DC70398326128B89009F2DC1 /* NSString+ByteCountParser.h */,
);
path = "Foundation Extensions";
sourceTree = "<group>";
Expand Down Expand Up @@ -3132,6 +3153,7 @@
DC4332002472E1B4002DC0E5 /* OCLicenseEMMProvider.h in Headers */,
DCFEFE39236877A7009A142F /* OCLicenseFeature.h in Headers */,
DC23D1DA238F391200423F62 /* OCLicenseAppStoreReceipt.h in Headers */,
DC70398526128B89009F2DC1 /* NSString+ByteCountParser.h in Headers */,
DCF2DA8324C83BFB0026D790 /* OCFileProviderService.h in Headers */,
DCF2DA8624C87A330026D790 /* OCCore+FPServices.h in Headers */,
DC774E6022F44E57000B11A1 /* ZIPArchive.h in Headers */,
Expand All @@ -3157,6 +3179,8 @@
DCF2DA8124C836240026D790 /* OCBookmark+FPServices.h in Headers */,
DC66F3A523965A1400CF4812 /* NSDate+RFC3339.h in Headers */,
DC0030C22350B1CE00BB8570 /* NSData+Encoding.h in Headers */,
DCCD77792604C91600098573 /* NSDate+ComputedTimes.h in Headers */,
DCB458ED2604A7D4006A02AB /* OCQueryCondition+SearchSegmenter.h in Headers */,
DCC5E4472326564F002E5B84 /* NSObject+AnnotatedProperties.h in Headers */,
DC66F3AB23965C9C00CF4812 /* OCLicenseAppStoreReceiptInAppPurchase.h in Headers */,
DC049156258C00C400DEDC27 /* OCFileProviderServiceStandby.h in Headers */,
Expand Down Expand Up @@ -4245,6 +4269,7 @@
files = (
DCFEFE9D2368D7FA009A142F /* OCLicenseObserver.m in Sources */,
DC66F39D239659C000CF4812 /* OCASN1.m in Sources */,
DCCD778C2604C91B00098573 /* NSDate+ComputedTimes.m in Sources */,
DC66F3A623965A1400CF4812 /* NSDate+RFC3339.m in Sources */,
DCF2DA8724C87A330026D790 /* OCCore+FPServices.m in Sources */,
DC7C101224B5FD6500227085 /* OCBookmark+AppExtensions.m in Sources */,
Expand All @@ -4260,6 +4285,7 @@
DCFEFE2B236876BD009A142F /* OCLicenseManager.m in Sources */,
DCDC20A22399A715003CFF5B /* OCCore+LicenseEnvironment.m in Sources */,
DCDC20AC2399A8CF003CFF5B /* OCLicenseEnterpriseProvider.m in Sources */,
DC70398626128B89009F2DC1 /* NSString+ByteCountParser.m in Sources */,
DCFEFE3A236877A7009A142F /* OCLicenseFeature.m in Sources */,
DCFEFE50236880B5009A142F /* OCLicenseOffer.m in Sources */,
DC0030C12350B1CE00BB8570 /* NSData+Encoding.m in Sources */,
Expand All @@ -4273,6 +4299,7 @@
DCFEFE4A23687C83009A142F /* OCLicenseEntitlement.m in Sources */,
DC66F3AC23965C9C00CF4812 /* OCLicenseAppStoreReceiptInAppPurchase.m in Sources */,
DCD8109B23984AF6003B0053 /* OCLicenseDuration.m in Sources */,
DCB458EE2604A7D4006A02AB /* OCQueryCondition+SearchSegmenter.m in Sources */,
DC080CF3238C92480044C5D2 /* OCLicenseAppStoreItem.m in Sources */,
DCFEFE982368D099009A142F /* OCLicenseEnvironment.m in Sources */,
DC049157258C00C400DEDC27 /* OCFileProviderServiceStandby.m in Sources */,
Expand All @@ -4284,6 +4311,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
DCB459052604AD2A006A02AB /* SearchSegmentationTests.m in Sources */,
DCE442CE2387452000940A6D /* LicensingTests.m in Sources */,
39057AA7233BA7A60008E6C0 /* Intents.intentdefinition in Sources */,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,18 @@
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
<AdditionalOptions>
<AdditionalOption
key = "MallocStackLogging"
value = ""
isEnabled = "YES">
</AdditionalOption>
<AdditionalOption
key = "PrefersMallocStackLoggingLite"
value = ""
isEnabled = "YES">
</AdditionalOption>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class CollaborateAction: Action {
override class var name : String { return "Sharing".localized }
override class var locations : [OCExtensionLocationIdentifier]? { return [.keyboardShortcut, .contextMenuSharingItem] }
override class var keyCommand : String? { return "S" }
override class var keyModifierFlags: UIKeyModifierFlags? { return [.command, .control] }
override class var keyModifierFlags: UIKeyModifierFlags? { return [.command] }

// MARK: - Extension matching
override class func applicablePosition(forContext: ActionContext) -> ActionPosition {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class OpenInAction: Action {
self.interactionController = UIDocumentInteractionController(url: fileURL)
self.interactionController?.delegate = self

if let _ = self.context.sender as? UIKeyCommand, let hostViewController = hostViewController {
if self.context.sender as? UIKeyCommand != nil, let hostViewController = hostViewController {
var sourceRect = hostViewController.view.frame
sourceRect.origin.x = viewController.view.center.x
sourceRect.origin.y = viewController.navigationController?.navigationBar.frame.size.height ?? 0.0
Expand Down
Loading

0 comments on commit 288a1c2

Please sign in to comment.