This repository has been archived by the owner on Oct 28, 2024. It is now read-only.
forked from mastodon/mastodon-android
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge: rename ListTimeline to FollowList
- Loading branch information
Showing
14 changed files
with
104 additions
and
103 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
1 change: 0 additions & 1 deletion
1
mastodon/src/main/java/org/joinmastodon/android/api/requests/lists/DeleteList.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
6 changes: 3 additions & 3 deletions
6
mastodon/src/main/java/org/joinmastodon/android/api/requests/lists/GetList.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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
package org.joinmastodon.android.api.requests.lists; | ||
|
||
import org.joinmastodon.android.api.MastodonAPIRequest; | ||
import org.joinmastodon.android.model.ListTimeline; | ||
import org.joinmastodon.android.model.FollowList; | ||
|
||
public class GetList extends MastodonAPIRequest<ListTimeline> { | ||
public class GetList extends MastodonAPIRequest<FollowList> { | ||
public GetList(String id) { | ||
super(HttpMethod.GET, "/lists/" + id, ListTimeline.class); | ||
super(HttpMethod.GET, "/lists/" + id, FollowList.class); | ||
} | ||
} |
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
8 changes: 4 additions & 4 deletions
8
mastodon/src/main/java/org/joinmastodon/android/api/requests/lists/UpdateList.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
6 changes: 3 additions & 3 deletions
6
mastodon/src/main/java/org/joinmastodon/android/events/ListUpdatedCreatedEvent.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
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
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
43 changes: 43 additions & 0 deletions
43
mastodon/src/main/java/org/joinmastodon/android/model/FollowList.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,43 @@ | ||
package org.joinmastodon.android.model; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
import org.joinmastodon.android.api.AllFieldsAreRequired; | ||
import org.joinmastodon.android.api.ObjectValidationException; | ||
import org.parceler.Parcel; | ||
|
||
// Called like this to avoid conflict with java.util.List | ||
@AllFieldsAreRequired | ||
@Parcel | ||
public class FollowList extends BaseModel{ | ||
public String id; | ||
public String title; | ||
public RepliesPolicy repliesPolicy=RepliesPolicy.LIST; | ||
public boolean exclusive; | ||
|
||
@Override | ||
public String toString(){ | ||
return "FollowList{"+ | ||
"id='"+id+'\''+ | ||
", title='"+title+'\''+ | ||
", repliesPolicy="+repliesPolicy+ | ||
", exclusive="+exclusive+ | ||
'}'; | ||
} | ||
|
||
@Override | ||
public void postprocess() throws ObjectValidationException{ | ||
if(repliesPolicy==null) | ||
repliesPolicy=RepliesPolicy.LIST; | ||
super.postprocess(); | ||
} | ||
|
||
public enum RepliesPolicy{ | ||
@SerializedName("followed") | ||
FOLLOWED, | ||
@SerializedName("list") | ||
LIST, | ||
@SerializedName("none") | ||
NONE | ||
} | ||
} |
Oops, something went wrong.