Skip to content
This repository has been archived by the owner on Dec 12, 2022. It is now read-only.

Store Messages And Rooms and offer Offline experience #429

Open
expertalex opened this issue May 26, 2018 · 0 comments
Open

Store Messages And Rooms and offer Offline experience #429

expertalex opened this issue May 26, 2018 · 0 comments

Comments

@expertalex
Copy link

Hello. We want to offer offline experience and we use the MXFileStore in the app delegate:

...
// Prepare account manager
MXKAccountManager *accountManager = [MXKAccountManager sharedManager];
    
// Use MXFileStore as MXStore to permanently store events.
accountManager.storeClass = [MXFileStore class];

 [accountManager prepareSessionForActiveAccounts];
....

Then to load the recents we use this code:

// Create a data source for managing data
MXKRecentsDataSource *recentsDataSource = [[MXKRecentsDataSource alloc] initWithMatrixSession:mxSession];

// Create the view controller that will display it
MXKRecentListViewController *recentListViewController = [[MXKRecentListViewController alloc] init];
[recentListViewController displayList:recentsDataSource];

But without internet connection any room is shown... Why?

P.S. The session comes form the AccountManager.shared.account.first.mxSession

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant