Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poll not usable after logging out and back in #7072

Merged
merged 3 commits into from
Nov 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Riot/Modules/Application/LegacyAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -2197,6 +2197,8 @@ - (void)logoutSendingRequestServer:(BOOL)sendLogoutServerRequest

[[[ReviewSessionAlertSnoozeController alloc] init] clearSnooze];

[TimelinePollProvider.shared reset];

#ifdef MX_CALL_STACK_ENDPOINT
// Erase all created certificates and private keys by MXEndpointCallStack
for (MXKAccount *account in MXKAccountManager.sharedManager.accounts)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@

import Foundation

class TimelinePollProvider {
@objcMembers
class TimelinePollProvider: NSObject {
static let shared = TimelinePollProvider()

var session: MXSession?
var coordinatorsForEventIdentifiers = [String: TimelinePollCoordinator]()

private init() { }

/// Create or retrieve the poll timeline coordinator for this event and return
/// a view to be displayed in the timeline
func buildTimelinePollVCForEvent(_ event: MXEvent) -> UIViewController? {
Expand All @@ -49,4 +48,8 @@ class TimelinePollProvider {
func timelinePollCoordinatorForEventIdentifier(_ eventIdentifier: String) -> TimelinePollCoordinator? {
coordinatorsForEventIdentifiers[eventIdentifier]
}

func reset() {
coordinatorsForEventIdentifiers.removeAll()
}
}
1 change: 1 addition & 0 deletions changelog.d/7070.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Poll not usable after logging out and back in.