Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
pantstamp committed Feb 20, 2024
1 parent 333c1c7 commit e1800ed
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
import android.util.Log;
import android.view.DragEvent;
import android.view.Menu;
import android.view.MenuInflater;
Expand Down Expand Up @@ -824,6 +825,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 +3750,12 @@ public void onPostChanged(OnPostChanged event) {
RemotePreviewType.REMOTE_PREVIEW_WITH_REMOTE_AUTO_SAVE);
}
}

//for testing only
mEditPostRepository.loadPostByLocalPostId(mEditPostRepository.getId());
String dateCreated = Objects.requireNonNull(mEditPostRepository.getPost()).getDateCreated();
Log.d("mytest","mEditPostRepository post getDbTimestamp = " + mEditPostRepository.getPost().getDbTimestamp());
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
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ext {
automatticTracksVersion = '3.4.0'
gutenbergMobileVersion = 'v1.112.0'
wordPressAztecVersion = 'v2.0'
wordPressFluxCVersion = 'trunk-ed60798b4d96ec19863c74b0f525e2e20f4525db'
wordPressFluxCVersion = '2957-aae6270fa40e9142b97ab9c28ab376226450d2f2'
wordPressLoginVersion = 'trunk-a90b1ce939aba700d822f188d41624385f9c1dce'
wordPressPersistentEditTextVersion = '1.0.2'
wordPressUtilsVersion = '3.13.0'
Expand Down

0 comments on commit e1800ed

Please sign in to comment.