You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The way the interests feature stores the currently selected topic ID violates SSOT #2006
On the InterestsScreen when a user taps on a topic, 2 things happen:
a navigation event which pushes TopicNavKey(topicId) on to the back stack
InterestsViewModel is updated with the selected topic Id
This violates SSOT because the currently selected topic Id is now stored in 2 places. We should come up with a better way of doing this. Ideas:
Have InterestsViewModel derive the current selected topic id from the TopicNavKey on the back stack. This would require InterestsViewModel having access to NavigationState.
Pass the navigator to InterestsViewModel. Then its onTopicClick method can navigate as well as updating its own currently selected topic ID (still violates SSOT but is architecturally better and simpler to implement).
Activity