Commit 06a0f676 authored by Yannick Reifschneider's avatar Yannick Reifschneider Committed by Felix Paul Kühne

deletion capable view: allow delete only during editing

The deletion capable view controller allowed deletion of a file without being toggled into editing mode once after app launch. Disabling the play/pause and cancel press recognizers during viewDidLoad fixes this behaviour.

(closes #948)
Signed-off-by: Felix Paul Kühne's avatarFelix Paul Kühne <>
parent ffb4eddf
Pipeline #56616 passed with stages
in 18 minutes and 18 seconds
......@@ -33,17 +33,23 @@
UITapGestureRecognizer *cancelRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(endEditMode)];
cancelRecognizer.allowedPressTypes = @[@(UIPressTypeSelect),@(UIPressTypeMenu)];
cancelRecognizer.enabled = self.editing;
self.cancelRecognizer = cancelRecognizer;
[self.view addGestureRecognizer:cancelRecognizer];
UITapGestureRecognizer *playPauseRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handlePlayPausePress)];
playPauseRecognizer.allowedPressTypes = @[@(UIPressTypePlayPause)];
playPauseRecognizer.enabled = self.editing;
self.playPausePressRecognizer = playPauseRecognizer;
[self.view addGestureRecognizer:playPauseRecognizer];
- (void)handlePlayPausePress
if (!self.editing) {
NSString *fileToDelete = self.itemToDelete;
if (fileToDelete == nil)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment