Scheduled toot (#1004)

* Scheduled toot

* Hide scheduled toot button if version < 2.7.0

* Fix timeline reloading after toot

* Add edit icon to ComposeScheduleView

* Add button to reset scheduled toot

* Close bottom sheet and change button color after time a was selected

* Fix edit icon's size

* List of scheduled toots

* Fix instance version check

* Use MaterialDatePicker

* Set date and time consecutively

* Add licenses
This commit is contained in:
kyori19 2019-10-03 04:28:12 +09:00 committed by Konrad Pozniak
commit 9e4c19a47e
23 changed files with 933 additions and 56 deletions

View file

@ -23,20 +23,8 @@ import okhttp3.RequestBody
import okhttp3.ResponseBody
import retrofit2.Call
import retrofit2.Response
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.*
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded
import retrofit2.http.GET
import retrofit2.http.HTTP
import retrofit2.http.Header
import retrofit2.http.Multipart
import retrofit2.http.PATCH
import retrofit2.http.POST
import retrofit2.http.PUT
import retrofit2.http.Part
import retrofit2.http.Path
import retrofit2.http.Query
/**
* for documentation of the Mastodon REST API see https://docs.joinmastodon.org/api/
@ -202,6 +190,14 @@ interface MastodonApi {
@Path("id") statusId: String
): Single<Status>
@GET("api/v1/scheduled_statuses")
fun scheduledStatuses(): Call<List<ScheduledStatus>>
@DELETE("api/v1/scheduled_statuses/{id}")
fun deleteScheduledStatus(
@Path("id") scheduledStatusId: String
): Call<ResponseBody>
@GET("api/v1/accounts/verify_credentials")
fun accountVerifyCredentials(): Single<Account>