Skip to content
This repository was archived by the owner on Oct 28, 2024. It is now read-only.

Commit d30b1f7

Browse files
committed
hide scheduling options when editing
closes #364
1 parent c0ee16c commit d30b1f7

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

mastodon/src/main/java/org/joinmastodon/android/fragments/ComposeFragment.java

+5
Original file line numberDiff line numberDiff line change
@@ -791,6 +791,11 @@ public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){
791791
draftsBtn.setOnTouchListener(draftOptionsPopup.getDragToOpenListener());
792792
updateScheduledAt(scheduledAt != null ? scheduledAt : scheduledStatus != null ? scheduledStatus.scheduledAt : null);
793793
buildLanguageSelector(languageButton);
794+
795+
if (editingStatus != null && scheduledStatus == null) {
796+
// editing an already published post
797+
draftsBtn.setVisibility(View.GONE);
798+
}
794799
}
795800

796801
private void navigateToUnsentPosts() {

mastodon/src/main/res/layout/compose_action.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
android:id="@+id/drafts_btn"
4343
android:layout_width="wrap_content"
4444
android:layout_height="wrap_content"
45-
android:layout_marginEnd="8dp"
4645
android:paddingHorizontal="8dp"
4746
android:drawableStart="@drawable/ic_fluent_clock_20_regular"
4847
android:drawableTint="?android:textColorSecondary"
@@ -55,6 +54,7 @@
5554
android:id="@+id/publish_btn"
5655
android:layout_width="wrap_content"
5756
android:layout_height="wrap_content"
57+
android:layout_marginStart="8dp"
5858
android:singleLine="true"
5959
android:ellipsize="end" />
6060

0 commit comments

Comments
 (0)