feat: implement notification for multiple accounts handler
This commit is contained in:
parent
eaa2ef4083
commit
cafd4cc3f2
|
@ -7,12 +7,12 @@
|
||||||
<key>AppShared.xcscheme_^#shared#^_</key>
|
<key>AppShared.xcscheme_^#shared#^_</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>orderHint</key>
|
<key>orderHint</key>
|
||||||
<integer>42</integer>
|
<integer>36</integer>
|
||||||
</dict>
|
</dict>
|
||||||
<key>CoreDataStack.xcscheme_^#shared#^_</key>
|
<key>CoreDataStack.xcscheme_^#shared#^_</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>orderHint</key>
|
<key>orderHint</key>
|
||||||
<integer>41</integer>
|
<integer>35</integer>
|
||||||
</dict>
|
</dict>
|
||||||
<key>Mastodon - ASDK.xcscheme_^#shared#^_</key>
|
<key>Mastodon - ASDK.xcscheme_^#shared#^_</key>
|
||||||
<dict>
|
<dict>
|
||||||
|
@ -97,7 +97,7 @@
|
||||||
<key>MastodonIntent.xcscheme_^#shared#^_</key>
|
<key>MastodonIntent.xcscheme_^#shared#^_</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>orderHint</key>
|
<key>orderHint</key>
|
||||||
<integer>43</integer>
|
<integer>38</integer>
|
||||||
</dict>
|
</dict>
|
||||||
<key>MastodonIntents.xcscheme_^#shared#^_</key>
|
<key>MastodonIntents.xcscheme_^#shared#^_</key>
|
||||||
<dict>
|
<dict>
|
||||||
|
@ -117,7 +117,7 @@
|
||||||
<key>ShareActionExtension.xcscheme_^#shared#^_</key>
|
<key>ShareActionExtension.xcscheme_^#shared#^_</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>orderHint</key>
|
<key>orderHint</key>
|
||||||
<integer>44</integer>
|
<integer>37</integer>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
<key>SuppressBuildableAutocreation</key>
|
<key>SuppressBuildableAutocreation</key>
|
||||||
|
|
|
@ -94,9 +94,21 @@ final public class SceneCoordinator {
|
||||||
guard let self = self else { return }
|
guard let self = self else { return }
|
||||||
|
|
||||||
// Note:
|
// Note:
|
||||||
// show (push) on phone
|
// show (push) on phone or pad (compact)
|
||||||
// showDetail in .secondary in UISplitViewController on pad
|
// showDetail in .secondary in UISplitViewController on pad (expand)
|
||||||
let from = self.splitViewController?.topMost ?? self.tabBarController.topMost
|
let from: UIViewController? = {
|
||||||
|
if let splitViewController = self.splitViewController {
|
||||||
|
if splitViewController.mainTabBarController.topMost?.view.window != nil {
|
||||||
|
// compact
|
||||||
|
return splitViewController.mainTabBarController.topMost
|
||||||
|
} else {
|
||||||
|
// expand
|
||||||
|
return splitViewController.viewController(for: .supplementary)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return self.tabBarController.topMost
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
// show notification related content
|
// show notification related content
|
||||||
guard let type = Mastodon.Entity.Notification.NotificationType(rawValue: pushNotification.notificationType) else { return }
|
guard let type = Mastodon.Entity.Notification.NotificationType(rawValue: pushNotification.notificationType) else { return }
|
||||||
|
|
Loading…
Reference in New Issue