Compare commits

..

20 Commits

Author SHA1 Message Date
LucasGGamerM
db9e427444 Bump version number 2022-12-12 21:45:48 -03:00
LucasGGamerM
4474a584df Fixed the lists tab order. This should partially fix #3 2022-12-12 21:11:15 -03:00
LucasGGamerM
ab00ad68f1 Fixed the lists tab order. This should partially fix #3 2022-12-12 20:43:42 -03:00
LucasGGamerM
d1e77efa1c Revert "Adding a tab on the tabbar and showing lists. Its still an early alpha though"
This reverts commit bfd87cf94e.
2022-12-12 20:40:11 -03:00
LucasGGamerM
de00353864 Revert "Why doesnt this work"
This reverts commit be3c12dfb3.
2022-12-12 20:40:10 -03:00
LucasGGamerM
feec459d47 Revert "Fixed the lists tab order. This should partially fix #3"
This reverts commit 1f51331f67.
2022-12-12 20:40:10 -03:00
LucasGGamerM
ad68d7e4f2 Revert "The placeholders are now there."
This reverts commit 0ca9c536cd.
2022-12-12 20:40:10 -03:00
LucasGGamerM
cf27c6bbf3 Revert "The placeholders are better. But the api thing isnt working"
This reverts commit a3267f6cd3.
2022-12-12 20:40:10 -03:00
LucasGGamerM
0115656d67 Revert "And it still doesnt work"
This reverts commit 002687d2b1.
2022-12-12 20:40:10 -03:00
LucasGGamerM
002687d2b1 And it still doesnt work 2022-12-12 17:12:55 -03:00
LucasGGamerM
a3267f6cd3 The placeholders are better. But the api thing isnt working 2022-12-12 16:10:27 -03:00
LucasGGamerM
0ca9c536cd The placeholders are now there. 2022-12-12 14:20:56 -03:00
LucasGGamerM
382a23c0b6 Tests 2022-12-12 14:03:44 -03:00
LucasGGamerM
1f51331f67 Fixed the lists tab order. This should partially fix #3 2022-12-11 20:12:27 -03:00
LucasGGamerM
cce6ba0746 Undoing all the stuff that was broken 2022-12-11 15:55:28 -03:00
LucasGGamerM
be3c12dfb3 Why doesnt this work 2022-12-11 14:06:22 -03:00
LucasGGamerM
bfd87cf94e Adding a tab on the tabbar and showing lists. Its still an early alpha though 2022-12-11 11:58:28 -03:00
LucasGGamerM
857bb1e483 Forgot the edit entry 2022-12-10 20:17:31 -03:00
LucasGGamerM
75a131b675 Api side done 2022-12-10 20:06:45 -03:00
LucasGGamerM
d98b1c5ee1 Update readme 2022-12-10 17:38:08 -03:00
9 changed files with 108 additions and 13 deletions

View File

@@ -1,6 +1,6 @@
![Pink logo with pink shark](mastodon/src/main/res/mipmap-xhdpi/ic_launcher_round.png) ![Pink logo with pink shark](mastodon/src/main/res/mipmap-xhdpi/ic_launcher_round.png)
# Moshidon # Moshidon, the material you mastodon client!
> A fork of [megalodon](https://github.com/sk22/megalodon) which is a fork of [official Mastodon Android app](https://github.com/mastodon/mastodon-android) adding important features that are missing in the official app and possibly wont ever be implemented, such as the federated timeline, unlisted posting, bookmarks and an image description viewer. > A fork of [megalodon](https://github.com/sk22/megalodon) which is a fork of [official Mastodon Android app](https://github.com/mastodon/mastodon-android) adding important features that are missing in the official app and possibly wont ever be implemented, such as the federated timeline, unlisted posting, bookmarks and an image description viewer.
@@ -12,6 +12,8 @@
## Key features ## Key features
### **Material you theme support on Android 12+ devices!**
### **Translate button** ### **Translate button**
**Allows you to translate posts in instances with the translate feature!** **Allows you to translate posts in instances with the translate feature!**

View File

@@ -9,8 +9,8 @@ android {
applicationId "org.joinmastodon.android.moshinda" applicationId "org.joinmastodon.android.moshinda"
minSdk 23 minSdk 23
targetSdk 33 targetSdk 33
versionCode 63 versionCode 64
versionName "1.1.4+fork.63.moshinda" versionName "1.1.4+fork.64.moshinda"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
resConfigs "en", "ar-rSA", "bs-rBA", "ca-rES", "cs-rCZ", "de-rDE", "el-rGR", "es-rES", resConfigs "en", "ar-rSA", "bs-rBA", "ca-rES", "cs-rCZ", "de-rDE", "el-rGR", "es-rES",
"eu-rES", "fi-rFI", "fr-rFR", "gl-rES", "hr-rHR", "hy-rAM", "it-rIT", "iw-rIL", "eu-rES", "fi-rFI", "fr-rFR", "gl-rES", "hr-rHR", "hy-rAM", "it-rIT", "iw-rIL",

View File

@@ -0,0 +1,17 @@
package org.joinmastodon.android.api.requests.lists;
import org.joinmastodon.android.api.MastodonAPIRequest;
import java.util.List;
public class AddList extends MastodonAPIRequest<Object> {
public AddList(String listName){
super(HttpMethod.POST, "/lists", Object.class);
Request req = new Request();
req.title = listName;
setRequestBody(req);
}
public static class Request{
public String title;
}
}

View File

@@ -0,0 +1,17 @@
package org.joinmastodon.android.api.requests.lists;
import org.joinmastodon.android.api.MastodonAPIRequest;
import java.util.List;
public class EditListName extends MastodonAPIRequest<Object> {
public EditListName(String newListName, String listId){
super(HttpMethod.PUT, "/lists/"+listId, Object.class);
Request req = new Request();
req.title = newListName;
setRequestBody(req);
}
public static class Request{
public String title;
}
}

View File

@@ -0,0 +1,10 @@
package org.joinmastodon.android.api.requests.lists;
import org.joinmastodon.android.api.MastodonAPIRequest;
import java.util.List;
public class RemoveList extends MastodonAPIRequest<Object> {
public RemoveList(String listId){
super(HttpMethod.DELETE, "/lists/"+listId, Object.class);
}
}

View File

@@ -88,11 +88,11 @@ public class DiscoverFragment extends AppKitFragment implements ScrollableToTop,
tabView.setId(switch(switchIndex){ tabView.setId(switch(switchIndex){
case 0 -> R.id.discover_local_timeline; case 0 -> R.id.discover_local_timeline;
case 1 -> R.id.discover_federated_timeline; case 1 -> R.id.discover_federated_timeline;
case 2 -> R.id.discover_hashtags; case 2 -> R.id.discover_lists;
case 3 -> R.id.discover_posts; case 3 -> R.id.discover_hashtags;
case 4 -> R.id.discover_news; case 4 -> R.id.discover_posts;
case 5 -> R.id.discover_users; case 5 -> R.id.discover_news;
case 6 -> R.id.discover_lists; case 6 -> R.id.discover_users;
default -> throw new IllegalStateException("Unexpected value: "+switchIndex); default -> throw new IllegalStateException("Unexpected value: "+switchIndex);
}); });
tabView.setVisibility(View.GONE); tabView.setVisibility(View.GONE);
@@ -165,11 +165,12 @@ public class DiscoverFragment extends AppKitFragment implements ScrollableToTop,
tab.setText(switch(position){ tab.setText(switch(position){
case 0 -> R.string.local_timeline; case 0 -> R.string.local_timeline;
case 1 -> R.string.sk_federated_timeline; case 1 -> R.string.sk_federated_timeline;
case 2 -> R.string.hashtags; case 2 -> R.string.sk_list_timelines;
case 3 -> R.string.posts; case 3 -> R.string.hashtags;
case 4 -> R.string.news; case 4 -> R.string.posts;
case 5 -> R.string.for_you; case 5 -> R.string.news;
case 6 -> R.string.sk_list_timelines; case 6 -> R.string.for_you;
default -> throw new IllegalStateException("Unexpected value: "+position); default -> throw new IllegalStateException("Unexpected value: "+position);
}); });
tab.view.textView.setAllCaps(true); tab.view.textView.setAllCaps(true);

View File

@@ -0,0 +1,5 @@
<vector android:height="28dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="28dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M3,5v14h17L20,5L3,5zM7,7v2L5,9L5,7h2zM5,13v-2h2v2L5,13zM5,15h2v2L5,17v-2zM18,17L9,17v-2h9v2zM18,13L9,13v-2h9v2zM18,9L9,9L9,7h9v2z"/>
</vector>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<org.joinmastodon.android.ui.tabs.TabLayout
android:id="@+id/tabbar"
android:layout_width="match_parent"
android:layout_height="48dp"
app:tabGravity="fill"
app:tabIndicator="@drawable/mtrl_tabs_default_indicator"
app:tabIndicatorAnimationMode="elastic"
app:tabIndicatorColor="?android:textColorPrimary"
app:tabMode="fixed"
android:background="@drawable/bg_discover_tabs"/>
</LinearLayout>

View File

@@ -28,4 +28,29 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:paddingRight="16dp"/> android:paddingRight="16dp"/>
<!-- <ImageView-->
<!-- android:id="@+id/edit"-->
<!-- android:layout_width="36dp"-->
<!-- android:layout_height="36dp"-->
<!-- android:layout_marginTop="0dp"-->
<!-- android:layout_marginEnd="6dp"-->
<!-- android:layout_toStartOf="@id/list_toggle"-->
<!-- android:background="?android:selectableItemBackgroundBorderless"-->
<!-- android:scaleType="center"-->
<!-- android:src="@drawable/ic_fluent_edit_24_regular"-->
<!-- android:tint="?android:textColorSecondary" />-->
<!-- <ImageView-->
<!-- android:id="@+id/delete"-->
<!-- android:layout_width="36dp"-->
<!-- android:layout_height="36dp"-->
<!-- android:layout_marginTop="0dp"-->
<!-- android:layout_marginEnd="6dp"-->
<!-- android:layout_toStartOf="@id/edit"-->
<!-- android:background="?android:selectableItemBackgroundBorderless"-->
<!-- android:scaleType="center"-->
<!-- android:src="@drawable/ic_fluent_delete_24_regular"-->
<!-- android:tint="?android:textColorSecondary" />-->
</LinearLayout> </LinearLayout>