Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
pantstamp committed Feb 15, 2024
1 parent 333c1c7 commit f59bd06
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,14 @@ public void handleOnBackPressed() {
mEditorJetpackSocialViewModel.start(mSite, mEditPostRepository);

customizeToolbar();

// only for testing
if (mEditPostRepository.hasPost()) {
RemotePostPayload payload = new RemotePostPayload(mEditPostRepository.getEditablePost(), mSite);
mDispatcher.dispatch(PostActionBuilder.newFetchPostAction(payload));
}


}

private void customizeToolbar() {
Expand Down Expand Up @@ -3741,6 +3749,10 @@ public void onPostChanged(OnPostChanged event) {
RemotePreviewType.REMOTE_PREVIEW_WITH_REMOTE_AUTO_SAVE);
}
}

//for testing only
mEditPostRepository.loadPostByLocalPostId(mEditPostRepository.getId());
refreshEditorContent();
}

private boolean isRemotePreviewingFromEditor() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.wordpress.android.viewmodel.posts

import android.util.Log
import androidx.lifecycle.DefaultLifecycleObserver
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleOwner
Expand Down Expand Up @@ -40,6 +41,7 @@ class PostFetcher constructor(
// TODO: We should implement batch fetching when it's available in the API
@Suppress("ForbiddenComment")
fun fetchPosts(site: SiteModel, remoteItemIds: List<RemoteId>) {
Log.d("mytest", "fetchPosts() called")
remoteItemIds
.filter {
// ignore duplicate requests
Expand Down

0 comments on commit f59bd06

Please sign in to comment.