Multiple accounts #16

Closed
opened 2019-02-09 19:32:58 +00:00 by shadowfacts · 2 comments
Owner
No description provided.
shadowfacts added this to the 1.0.0 milestone 2019-02-09 19:32:58 +00:00
shadowfacts added the
enhancement
label 2019-02-09 19:32:58 +00:00
Author
Owner

This is going to need a massive refactor that touches almost every area of the code. As such, the infrastructure will be implemented before the UI is capable of signing into multiple accounts or switching between. The rough roadmap is:

  • Pass the MastodonController instance down through the VC hierarchy instead of global shared instance
    • is there a cleaner way of doing dependency injection than passing things into constructors? it gets ugly quick
  • Move MastodonCache to be specific to a MastodonController instance
  • Move ImageCaches to be specific to a MastodonController instance Not necessary
  • Adopt UIScenes and scene-based lifecycle
    • Change user activities & XCBActions to use window from active scene
      • or first scene found, if none are active
  • Get the top level MastodonController instance from the scene session
  • Change XCBActions and NSUserActivitys to get MastodonController from active scene
  • Allow adding additional accounts via user Preferences
  • Change NSUserActivitys to store acct they're in reference to use most recently active account account
    • get scene (active or new) for given account
  • Change XCBActions to use the most recently active account
  • Changed saved hashtags/instances to be account-specific
  • Store account used in drafts, only show drafts from current account
  • Allow switching accounts via user Preferences
  • Add long-pressing user profile tab bar item to switch accounts separate feature
This is going to need a massive refactor that touches almost every area of the code. As such, the infrastructure will be implemented before the UI is capable of signing into multiple accounts or switching between. The rough roadmap is: - [x] Pass the `MastodonController` instance down through the VC hierarchy instead of global shared instance - is there a cleaner way of doing dependency injection than passing things into constructors? it gets ugly quick - [x] Move `MastodonCache` to be specific to a `MastodonController` instance - [ ] ~~Move `ImageCache`s to be specific to a `MastodonController` instance~~ Not necessary - [x] Adopt `UIScene`s and [scene-based lifecycle](https://developer.apple.com/documentation/uikit/app_and_environment/managing_your_app_s_life_cycle#3200035) - [x] Change user activities & XCBActions to use window from active scene - or first scene found, if none are active - [x] Get the top level `MastodonController` instance from the scene session - [x] Change XCBActions and `NSUserActivity`s to get `MastodonController` from active scene - [x] Allow adding additional accounts via user Preferences - [x] ~~Change `NSUserActivity`s to store acct they're in reference to~~ use most recently active account account - ~~get scene (active or new) for given account~~ - [x] Change XCBActions to use the most recently active account - [x] Changed saved hashtags/instances to be account-specific - [x] Store account used in drafts, only show drafts from current account - [x] Allow switching accounts via user Preferences - [ ] ~~Add long-pressing user profile tab bar item to switch accounts~~ separate feature
shadowfacts self-assigned this 2020-01-05 20:29:16 +00:00
shadowfacts added a new dependency 2020-01-08 03:19:16 +00:00
Author
Owner

Multiple accounts has been merged into master 🎉

3220436893

Multiple accounts has been merged into master 🎉 32204368939d534e28df7570cd7558805b5a73bd
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: shadowfacts/Tusker#16
No description provided.