forked from LucasGGamerM/moshidon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drafts and scheduled posts (LucasGGamerM#217)
closes LucasGGamerM#100 closes LucasGGamerM#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
- Loading branch information
1 parent
98b96c7
commit 074efb0
Showing
25 changed files
with
854 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...on/src/main/java/org/joinmastodon/android/api/requests/statuses/GetScheduledStatuses.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package org.joinmastodon.android.api.requests.statuses; | ||
|
||
import com.google.gson.reflect.TypeToken; | ||
|
||
import org.joinmastodon.android.api.requests.HeaderPaginationRequest; | ||
import org.joinmastodon.android.model.ScheduledStatus; | ||
|
||
public class GetScheduledStatuses extends HeaderPaginationRequest<ScheduledStatus>{ | ||
public GetScheduledStatuses(String maxID, int limit){ | ||
super(HttpMethod.GET, "/scheduled_statuses", new TypeToken<>(){}); | ||
if(maxID!=null) | ||
addQueryParameter("max_id", maxID); | ||
if(limit>0) | ||
addQueryParameter("limit", limit+""); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
mastodon/src/main/java/org/joinmastodon/android/events/ScheduledStatusCreatedEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.joinmastodon.android.events; | ||
|
||
import org.joinmastodon.android.model.ScheduledStatus; | ||
|
||
public class ScheduledStatusCreatedEvent { | ||
public final ScheduledStatus scheduledStatus; | ||
public final String accountID; | ||
|
||
public ScheduledStatusCreatedEvent(ScheduledStatus scheduledStatus, String accountID){ | ||
this.scheduledStatus = scheduledStatus; | ||
this.accountID=accountID; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
mastodon/src/main/java/org/joinmastodon/android/events/ScheduledStatusDeletedEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.joinmastodon.android.events; | ||
|
||
import org.joinmastodon.android.model.ScheduledStatus; | ||
|
||
public class ScheduledStatusDeletedEvent{ | ||
public final String id; | ||
public final String accountID; | ||
|
||
public ScheduledStatusDeletedEvent(String id, String accountID){ | ||
this.id=id; | ||
this.accountID=accountID; | ||
} | ||
} |
Oops, something went wrong.