Compare commits
4 Commits
v1.1.1+for
...
v1.1.1+for
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
705e98729d | ||
|
|
108d16a157 | ||
|
|
e55ca6cc05 | ||
|
|
b8be1f184d |
19
README.md
@@ -1,8 +1,4 @@
|
|||||||
# Forked Mastodon for Android
|
# Mastodon for Android Fork
|
||||||
|
|
||||||
This is the repository for an officially forked Android app for Mastodon.
|
|
||||||
|
|
||||||
Learn more about the official app in the [blog post](https://blog.joinmastodon.org/2022/02/official-mastodon-for-android-app-is-coming-soon/).
|
|
||||||
|
|
||||||
## Changes
|
## Changes
|
||||||
|
|
||||||
@@ -18,6 +14,19 @@ Learn more about the official app in the [blog post](https://blog.joinmastodon.o
|
|||||||
* [Implement a bookmark button and list](https://github.com/sk22/mastodon-android-fork/tree/feature/bookmarks) ([Fixes issue](https://github.com/mastodon/mastodon-android/issues/22))
|
* [Implement a bookmark button and list](https://github.com/sk22/mastodon-android-fork/tree/feature/bookmarks) ([Fixes issue](https://github.com/mastodon/mastodon-android/issues/22))
|
||||||
* [Implement deleting and re-drafting](https://github.com/sk22/mastodon-android-fork/tree/feature/delete-redraft) ([Fixes issue](https://github.com/mastodon/mastodon-android/issues/21))
|
* [Implement deleting and re-drafting](https://github.com/sk22/mastodon-android-fork/tree/feature/delete-redraft) ([Fixes issue](https://github.com/mastodon/mastodon-android/issues/21))
|
||||||
|
|
||||||
|
## Fork-specific changes
|
||||||
|
|
||||||
|
* Custom app name
|
||||||
|
* Custom icon: Modulate upstream icon's hue by `161%` using ImageMagick
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mogrify -modulate 100,100,161 mastodon/src/main/res/mipmap-*/ic_launcher*.png
|
||||||
|
```
|
||||||
|
|
||||||
|
* Custom primary color: Hue of all `primary` colors in `colors.xml` is rotated
|
||||||
|
by `109.8°` (equivalent of `161%`, done by hand using
|
||||||
|
[PineTools](https://pinetools.com/shift-hue-color))
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
As this app is using Java 17 features, you need JDK 17 or newer to build it. Other than that, everything is pretty standard. You can either import the project into Android Studio and build it from there, or run the following command in the project directory:
|
As this app is using Java 17 features, you need JDK 17 or newer to build it. Other than that, everything is pretty standard. You can either import the project into Android Studio and build it from there, or run the following command in the project directory:
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ android {
|
|||||||
applicationId "org.joinmastodon.android.sk"
|
applicationId "org.joinmastodon.android.sk"
|
||||||
minSdk 23
|
minSdk 23
|
||||||
targetSdk 31
|
targetSdk 31
|
||||||
versionCode 15
|
versionCode 18
|
||||||
versionName '1.1.1+fork.15'
|
versionName '1.1.1+fork.18'
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ public class CreateOAuthApp extends MastodonAPIRequest<Application>{
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Request{
|
private static class Request{
|
||||||
public String clientName="Mastadon for Android";
|
public String clientName="Mastodon for Android Fork";
|
||||||
public String redirectUris=AccountSessionManager.REDIRECT_URI;
|
public String redirectUris=AccountSessionManager.REDIRECT_URI;
|
||||||
public String scopes=AccountSessionManager.SCOPE;
|
public String scopes=AccountSessionManager.SCOPE;
|
||||||
public String website="https://github.com/sk22/mastodon-android-fork";
|
public String website="https://github.com/sk22/mastodon-android-fork";
|
||||||
|
|||||||
@@ -137,10 +137,10 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{
|
|||||||
int id=menuItem.getItemId();
|
int id=menuItem.getItemId();
|
||||||
if(id==R.id.delete){
|
if(id==R.id.delete){
|
||||||
UiUtils.confirmDeletePost(item.parentFragment.getActivity(), item.parentFragment.getAccountID(), item.status, s->{});
|
UiUtils.confirmDeletePost(item.parentFragment.getActivity(), item.parentFragment.getAccountID(), item.status, s->{});
|
||||||
}else if(id==R.id.pin || id==R.id.unpin){
|
|
||||||
UiUtils.confirmPinPost(item.parentFragment.getActivity(), item.parentFragment.getAccountID(), item.status, !item.status.pinned, s->{});
|
|
||||||
}else if(id==R.id.delete_and_redraft) {
|
}else if(id==R.id.delete_and_redraft) {
|
||||||
UiUtils.confirmDeleteAndRedraftPost(item.parentFragment.getActivity(), item.parentFragment.getAccountID(), item.status, s->{});
|
UiUtils.confirmDeleteAndRedraftPost(item.parentFragment.getActivity(), item.parentFragment.getAccountID(), item.status, s->{});
|
||||||
|
}else if(id==R.id.pin || id==R.id.unpin){
|
||||||
|
UiUtils.confirmPinPost(item.parentFragment.getActivity(), item.parentFragment.getAccountID(), item.status, !item.status.pinned, s->{});
|
||||||
}else if(id==R.id.mute){
|
}else if(id==R.id.mute){
|
||||||
UiUtils.confirmToggleMuteUser(item.parentFragment.getActivity(), item.parentFragment.getAccountID(), account, relationship!=null && relationship.muting, r->{});
|
UiUtils.confirmToggleMuteUser(item.parentFragment.getActivity(), item.parentFragment.getAccountID(), account, relationship!=null && relationship.muting, r->{});
|
||||||
}else if(id==R.id.block){
|
}else if(id==R.id.block){
|
||||||
@@ -254,6 +254,7 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{
|
|||||||
Menu menu=optionsMenu.getMenu();
|
Menu menu=optionsMenu.getMenu();
|
||||||
boolean isOwnPost=AccountSessionManager.getInstance().isSelf(item.parentFragment.getAccountID(), account);
|
boolean isOwnPost=AccountSessionManager.getInstance().isSelf(item.parentFragment.getAccountID(), account);
|
||||||
menu.findItem(R.id.delete).setVisible(item.status!=null && isOwnPost);
|
menu.findItem(R.id.delete).setVisible(item.status!=null && isOwnPost);
|
||||||
|
menu.findItem(R.id.delete_and_redraft).setVisible(item.status!=null && isOwnPost);
|
||||||
menu.findItem(R.id.pin).setVisible(item.status!=null && isOwnPost && !item.status.pinned);
|
menu.findItem(R.id.pin).setVisible(item.status!=null && isOwnPost && !item.status.pinned);
|
||||||
menu.findItem(R.id.unpin).setVisible(item.status!=null && isOwnPost && item.status.pinned);
|
menu.findItem(R.id.unpin).setVisible(item.status!=null && isOwnPost && item.status.pinned);
|
||||||
menu.findItem(R.id.open_in_browser).setVisible(item.status!=null);
|
menu.findItem(R.id.open_in_browser).setVisible(item.status!=null);
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 96 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 154 KiB After Width: | Height: | Size: 146 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 34 KiB |
@@ -19,17 +19,17 @@
|
|||||||
<color name="gray_800t">#CC282C37</color>
|
<color name="gray_800t">#CC282C37</color>
|
||||||
<color name="gray_900">#101828</color>
|
<color name="gray_900">#101828</color>
|
||||||
|
|
||||||
<color name="primary_25">#FAFDFF</color>
|
<color name="primary_25">#fffafd</color>
|
||||||
<color name="primary_50">#EAF4FB</color>
|
<color name="primary_50">#fbeaf6</color>
|
||||||
<color name="primary_100">#D5E9F7</color>
|
<color name="primary_100">#f7d4ee</color>
|
||||||
<color name="primary_200">#BFDEF4</color>
|
<color name="primary_200">#f4bfe7</color>
|
||||||
<color name="primary_300">#AAD3F0</color>
|
<color name="primary_300">#f0aade</color>
|
||||||
<color name="primary_400">#95C8EC</color>
|
<color name="primary_400">#ec94d6</color>
|
||||||
<color name="primary_500">#80BCE8</color>
|
<color name="primary_500">#e780cd</color>
|
||||||
<color name="primary_600">#55A6E1</color>
|
<color name="primary_600">#e055bd</color>
|
||||||
<color name="primary_700">#2B90D9</color>
|
<color name="primary_700">#d92aad</color>
|
||||||
<color name="primary_800">#2273AE</color>
|
<color name="primary_800">#ae218a</color>
|
||||||
<color name="primary_900">#16486D</color>
|
<color name="primary_900">#6d1556</color>
|
||||||
<color name="error_25">#FFFBFA</color>
|
<color name="error_25">#FFFBFA</color>
|
||||||
<color name="error_50">#FEF3F2</color>
|
<color name="error_50">#FEF3F2</color>
|
||||||
<color name="error_100">#FEE4E2</color>
|
<color name="error_100">#FEE4E2</color>
|
||||||
|
|||||||