Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,13 @@ public void handleAutoSavePostIfNotDraftResult(@NonNull AutoSavePostIfNotDraftRe
public void onPostUploaded(OnPostUploaded event) {
// check if the event is related to the PostModel that is being uploaded by PostUploadHandler
if (!isPostUploading(event.post)) {
AppLog.w(T.POSTS, "PostUploadHandler > onPostUploaded: ignoring event for post "
+ (event.post != null ? event.post.getId() : "null")
+ " because it is not the currently uploading post"
+ " (current=" + (sCurrentUploadingPost != null
? sCurrentUploadingPost.getId() : "null") + ")"
+ (event.isError() ? " error: " + event.error.type
+ " " + event.error.message : ""));
return;
}
SiteModel site = mSiteStore.getSiteByLocalId(event.post.getLocalSiteId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,8 @@ public static void publishPost(Activity activity, final PostModel post, SiteMode
if (onPublishingCallback != null) {
onPublishingCallback.onPublishing(isFirstTimePublish);
}
} else {
ToastUtils.showToast(activity, R.string.no_network_message, ToastUtils.Duration.SHORT);
}
PostUtils.trackSavePostAnalytics(post, site);
}
Expand Down