autoDock and gesture interaction fixes
This commit is contained in:
1 parent
4dc96ba189
commit
5ee443337c
2 files changed
+19
-1
No files matched your search
@@ -19,6 +19,7 @@ import ObjectiveC.runtime
|
|||||||
@objc public static var mapping: [Int16:OnScreenWidgetView] = [:]
|
@objc public static var mapping: [Int16:OnScreenWidgetView] = [:]
|
||||||
@objc public static var isRestoring: Bool = false
|
@objc public static var isRestoring: Bool = false
|
||||||
@objc public static var hasRestoredFromAutoDock: Bool = false
|
@objc public static var hasRestoredFromAutoDock: Bool = false
|
||||||
|
@objc public static var autoDockRestoreInitByViewResize: Bool = false
|
||||||
@objc public static func set(widget:OnScreenWidgetView, for key:Int16) {
|
@objc public static func set(widget:OnScreenWidgetView, for key:Int16) {
|
||||||
mapping[key] = widget
|
mapping[key] = widget
|
||||||
}
|
}
|
||||||
@@ -3384,6 +3385,10 @@ import ObjectiveC.runtime
|
|||||||
completion: {_ in
|
completion: {_ in
|
||||||
self.autoDockIsDocked = false
|
self.autoDockIsDocked = false
|
||||||
self.restartAutoDockCountdown()
|
self.restartAutoDockCountdown()
|
||||||
|
if OnScreenWidgetView.autoDockRestoreInitByViewResize {
|
||||||
|
OnScreenWidgetView.autoDockRestoreInitByViewResize = false
|
||||||
|
OnScreenWidgetView.hasRestoredFromAutoDock = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -551,6 +551,11 @@
|
|||||||
name:UIKeyboardWillHideNotification
|
name:UIKeyboardWillHideNotification
|
||||||
object:nil];
|
object:nil];
|
||||||
|
|
||||||
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||||
|
selector:@selector(keyboardDidHide)
|
||||||
|
name:UIKeyboardDidHideNotification
|
||||||
|
object:nil];
|
||||||
|
|
||||||
[safeTimer start];
|
[safeTimer start];
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -767,6 +772,11 @@
|
|||||||
[_streamView keyboardWillHide];
|
[_streamView keyboardWillHide];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)keyboardDidHide{
|
||||||
|
_streamView.bounds = _deviceWindow.bounds;
|
||||||
|
_streamView.frame = _deviceWindow.frame;
|
||||||
|
}
|
||||||
|
|
||||||
- (void)handleAbnormalKeyboards:(NSNotification *)notification{
|
- (void)handleAbnormalKeyboards:(NSNotification *)notification{
|
||||||
[_streamView handleAbnormalKeyboards:notification];
|
[_streamView handleAbnormalKeyboards:notification];
|
||||||
}
|
}
|
||||||
@@ -1757,7 +1767,10 @@
|
|||||||
}
|
}
|
||||||
dispatch_time_t delayTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC));
|
dispatch_time_t delayTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC));
|
||||||
dispatch_after(delayTime, dispatch_get_main_queue(), ^{
|
dispatch_after(delayTime, dispatch_get_main_queue(), ^{
|
||||||
if(widget.autoDockEnabled) [widget restoreFromAutoDockWithAnimated:true];
|
if(widget.autoDockEnabled){
|
||||||
|
OnScreenWidgetView.autoDockRestoreInitByViewResize = true;
|
||||||
|
[widget restoreFromAutoDockWithAnimated:true];
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
[coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
|
[coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
|
||||||
|
|||||||
Reference in new issue
Block a user