Drafts and scheduled posts (#217)

closes #100
closes #59

* enable saving as draft (scheduled)
* add scheduled posts list
* fix NoSuchMethodError
* editable drafts/scheduled posts
* ui for drafts
* use instants between 9999-01-01 and 9999-12-31
* use save and draft strings
* map scheduled status params to status
* implement scheduling posts
* improve save/discard draft dialog
* persist scheduled date in state
* add unsent posts button to toolbar
* clean up imports
This commit is contained in:
LucasGGamerM
2022-12-31 14:28:06 -03:00
parent 074efb0813
commit 64d24f6002
16 changed files with 61 additions and 19 deletions

View File

@@ -14,20 +14,34 @@
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_marginTop="-6dp"
android:layout_marginRight="-8dp"
android:layout_marginEnd="-8dp"
android:background="?android:selectableItemBackgroundBorderless"
android:contentDescription="@string/more_options"
android:scaleType="center"
android:src="@drawable/ic_post_more"
android:tint="?android:textColorSecondary" />
<ImageView
android:id="@+id/delete_notification"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginTop="-6dp"
android:layout_marginEnd="2dp"
android:layout_toStartOf="@id/more"
android:visibility="gone"
android:background="?android:selectableItemBackgroundBorderless"
android:contentDescription="@string/sk_delete_notification"
android:scaleType="center"
android:src="@drawable/ic_fluent_dismiss_20_filled"
android:tint="?android:textColorSecondary" />
<ImageView
android:id="@+id/visibility"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginTop="-6dp"
android:layout_marginRight="6dp"
android:layout_toLeftOf="@id/more"
android:layout_marginEnd="2dp"
android:layout_toStartOf="@id/delete_notification"
android:background="?android:selectableItemBackgroundBorderless"
android:scaleType="center"
android:src="@drawable/ic_visibility"
@@ -45,7 +59,7 @@
android:id="@+id/name_wrap"
android:layout_width="match_parent"
android:layout_height="24dp"
android:layout_marginEnd="8dp"
android:layout_marginEnd="12dp"
android:layout_toStartOf="@id/visibility"
android:layout_toEndOf="@id/avatar">