mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-05-25 05:22:13 +00:00
fix ios click on push notifications not working
Some checks are pending
Flutter analyze & test / flutter_analyze_and_test (push) Waiting to run
Some checks are pending
Flutter analyze & test / flutter_analyze_and_test (push) Waiting to run
This commit is contained in:
parent
fe2dd06213
commit
d0eee1893e
2 changed files with 26 additions and 14 deletions
|
|
@ -36,16 +36,18 @@ import workmanager_apple
|
|||
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||
}
|
||||
|
||||
override func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
|
||||
override func application(
|
||||
_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]
|
||||
) -> Bool {
|
||||
|
||||
let sharingIntent = SwiftFlutterSharingIntentPlugin.instance
|
||||
if sharingIntent.hasSameSchemePrefix(url: url) {
|
||||
return sharingIntent.application(app, open: url, options: options)
|
||||
}
|
||||
let sharingIntent = SwiftFlutterSharingIntentPlugin.instance
|
||||
if sharingIntent.hasSameSchemePrefix(url: url) {
|
||||
return sharingIntent.application(app, open: url, options: options)
|
||||
}
|
||||
|
||||
// Proceed url handling for other Flutter libraries like app_links
|
||||
return super.application(app, open: url, options:options)
|
||||
}
|
||||
// Proceed url handling for other Flutter libraries like app_links
|
||||
return super.application(app, open: url, options: options)
|
||||
}
|
||||
|
||||
func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
|
||||
GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
|
||||
|
|
@ -58,7 +60,8 @@ import workmanager_apple
|
|||
NSLog(
|
||||
"Application delegate method userNotificationCenter:didReceive:withCompletionHandler: is called with user info: %@",
|
||||
response.notification.request.content.userInfo)
|
||||
//...
|
||||
super.userNotificationCenter(
|
||||
center, didReceive: response, withCompletionHandler: completionHandler)
|
||||
}
|
||||
|
||||
override func userNotificationCenter(
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ class HomeViewState extends State<HomeView> {
|
|||
Timer? _disableCameraTimer;
|
||||
|
||||
final MainCameraController _mainCameraController = MainCameraController();
|
||||
final PageController _homeViewPageController = PageController(initialPage: 1);
|
||||
late final PageController _homeViewPageController;
|
||||
|
||||
StreamSubscription<List<SharedFile>>? _intentStreamSub;
|
||||
StreamSubscription<Uri>? _deepLinkSub;
|
||||
|
|
@ -53,12 +53,21 @@ class HomeViewState extends State<HomeView> {
|
|||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
var initialPage = widget.initialPage;
|
||||
if (initialPage == 1 && !userService.currentUser.startWithCameraOpen) {
|
||||
initialPage = 0;
|
||||
}
|
||||
_activePageIdx = initialPage;
|
||||
_homeViewPageController = PageController(initialPage: initialPage);
|
||||
|
||||
_mainCameraController.setState = () {
|
||||
if (mounted) setState(() {});
|
||||
};
|
||||
|
||||
_homeViewPageIndexSub = streamHomeViewPageIndex.stream.listen((index) {
|
||||
_homeViewPageController.jumpToPage(index);
|
||||
if (_homeViewPageController.hasClients) {
|
||||
_homeViewPageController.jumpToPage(index);
|
||||
}
|
||||
setState(() {
|
||||
_activePageIdx = index;
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue