Compare commits

...

78 Commits

Author SHA1 Message Date
LucasGGamerM
b29189ad2a refactor: move mastodon/session/session to mastodon/session package 2023-05-14 14:43:57 -03:00
LucasGGamerM
f725e46bb2 refactor: move mastodon api calls to own package
This should help organization for implementing the misskey side of the api
2023-05-14 11:24:18 -03:00
LucasGGamerM
3c14ec8195 feat: hacking together a prototype for the api abstraction layer
So far it works for the home timelines, next I gotta figure out how to see what type of server a logged in account is from
2023-05-14 11:24:18 -03:00
LucasGGamerM
eb78823cb1 feat: initial commit for the ApiAdapter class
This needs a *lot* of work to make moshidon *key compatible
2023-05-14 11:24:18 -03:00
LucasGGamerM
3b7e11ba96 feat: fix wrong order in ownProfile menu 2023-05-14 11:23:39 -03:00
LucasGGamerM
889fff5103 fix: fix crash on TrendingHashtagsFragment when Hashtah history is null
This is the same fix applied for akkoma instances in 42ae74f1a7
It also applies for calckey instances
2023-05-14 09:24:49 -03:00
LucasGGamerM
84ae1aad56 feat: remove requiredField for header account attribute
Sometimes null on calckey, which would make the search not work
2023-05-14 08:55:50 -03:00
LucasGGamerM
e9a2fae600 feat: increase padding between FileStatusDisplayItems
This is for better consistency on the notifications tab, and it also looks better overall
Don't worry @sk22, I shall make a PR for it all sometime in the near future
2023-05-13 21:45:52 -03:00
LucasGGamerM
d32f03a067 fix: fixes crash on calckey where markers are null 2023-05-13 21:29:59 -03:00
LucasGGamerM
7020018bb7 fix: fixes remote attachments pointing to unexistent file in local server
This fixes broken links to file attachments from calckey accounts on mastodon instances
2023-05-13 21:29:59 -03:00
LucasGGamerM
0cd0b9d580 fix: fix crashes when previewUrl is null on calckey 2023-05-13 21:29:55 -03:00
LucasGGamerM
3fda9e9eab feat: add file attachments view
This also fixes crashes on Calckey due to now being able to handle any type of attachment.
@sk22 this is also great for you
2023-05-13 21:29:16 -03:00
LucasGGamerM
697262bb47 fix(custom-local-timelines): fix crash when lookup returns null
This happens when the custom local timeline is from an instance which is defederated from your home instance, which makes looking up the status impossible.
2023-05-08 17:22:31 -03:00
LucasGGamerM
5102fa2699 feat: hide changelog header when update changelog is empty 2023-05-07 15:40:18 -03:00
LucasGGamerM
65907742a6 fix: fix nightly auto-updater 2023-05-05 16:43:43 -03:00
LucasGGamerM
6ef55f8b31 documentation: fix wrong formatting in readme 2023-05-05 09:29:42 -03:00
LucasGGamerM
313448c42a Merge pull request #188 from LucasGGamerM/documentation/readme-revamp
decumentation: update readme
2023-05-05 09:17:21 -03:00
LucasGGamerM
4883f24fc7 fix(noteEdit): fix fab remaining clickable after hiding in noteEdit 2023-05-05 09:05:54 -03:00
LucasGGamerM
be5ed6e224 documentation: add FAQ link in readme 2023-05-05 08:58:56 -03:00
LucasGGamerM
3b32fe3663 documentation: move F.A.Q to separate file 2023-05-05 08:54:28 -03:00
LucasGGamerM
e15b752bad documentation: update links to matrix chatroom
Use floss.social links instead of matrix.org ones
2023-05-05 08:50:15 -03:00
LucasGGamerM
5928cf675a documentation: update features and behavior sections on readme 2023-05-05 08:46:39 -03:00
LucasGGamerM
7655a5a3ae documentation: update release variants section in readme 2023-05-05 08:24:03 -03:00
LucasGGamerM
b5e0fca9c0 documentation: removing another exclamation mark 2023-05-04 07:36:10 -03:00
LucasGGamerM
bac6f58115 documentation: remove unnecessary exclamation marks on README 2023-05-04 07:35:21 -03:00
LucasGGamerM
e2a20f9599 documentation: remove over used bold sub texts 2023-05-03 11:16:58 -03:00
LucasGGamerM
900823e0dd documentation: add reminder to add alt text feature header 2023-05-03 11:13:21 -03:00
LucasGGamerM
918bda54d6 documentation: move F.A.Q to the bottom.
TODO: eventually move the F.A.Q into its own page
2023-05-03 11:06:52 -03:00
LucasGGamerM
cc1d1180e8 documentation: add translate feature header on readme 2023-05-03 11:02:48 -03:00
LucasGGamerM
006c0d00f2 documentation: add nightly to the readme app variants 2023-05-03 10:53:04 -03:00
LucasGGamerM
741a55110a documentation: add remote followers header in readme 2023-05-03 10:39:52 -03:00
LucasGGamerM
f7dcb754ed documentation: remove duplicate material you header
This removed the material you header, and instead move it to the color themes section
2023-05-03 10:25:10 -03:00
LucasGGamerM
f5e50bf668 decumentation: update readme
Updates custom local timelines feature header in readme
2023-05-03 10:21:08 -03:00
LucasGGamerM
4ad895ab71 Revert "fix(custom-local-timelines): fix inconsistent actions"
Reverting this due to realization I did it the other way due to it being better
2023-05-03 08:57:22 -03:00
LucasGGamerM
0fccd0ab37 fix(custom-local-timelines): fix inconsistent actions
This fixes a "bug" where you would favorite a post, then reload the page, and favorite the post again, your favorite would not "count". As in, you would click to favorite, and the favorite would just stay as is
2023-05-03 08:36:16 -03:00
LucasGGamerM
4fc6a8a2a5 Merge pull request #185
fix(translation): use lookUp status id for request
2023-05-01 17:20:32 -03:00
FineFindus
397d768f3a fix(translation): use lookUp status id for request 2023-05-01 17:50:48 +02:00
LucasGGamerM
f76eba894a feat(search): show hashtag subtitles even if item.history is null 2023-04-29 17:12:35 -03:00
LucasGGamerM
42ae74f1a7 fix(search): crash on akkoma where hashtag histories arent present 2023-04-29 16:53:58 -03:00
LucasGGamerM
9d09a904ab build: fixing debug build with wrong resources 2023-04-29 16:38:14 -03:00
LucasGGamerM
5366c92b4d build: fixing wrong drawables for github release 2023-04-28 16:26:17 -03:00
LucasGGamerM
c047c53aac build: bumping version name from 1.2.0 to 1.3.0
I forgot to do it
2023-04-28 16:05:12 -03:00
LucasGGamerM
489a49ca40 build: bump version number 2023-04-28 15:53:46 -03:00
LucasGGamerM
ed44a4dac4 Merge remote-tracking branch 'weblate/master' 2023-04-28 15:53:11 -03:00
nitrogenez47ab3e44720c4675
dc5c2dd907 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (274 of 274 strings)

Translation: Moshidon/values_sk
Translate-URL: https://translate.codeberg.org/projects/moshidon/values_sk/uk/
2023-04-28 18:51:54 +00:00
Eryk Michalak
cd86d04c9f Translated using Weblate (Polish)
Currently translated at 100.0% (274 of 274 strings)

Translation: Moshidon/values_sk
Translate-URL: https://translate.codeberg.org/projects/moshidon/values_sk/pl/
2023-04-28 18:51:54 +00:00
Andrewblasco
d0c64fcdf5 Translated using Weblate (Spanish)
Currently translated at 100.0% (274 of 274 strings)

Translation: Moshidon/values_sk
Translate-URL: https://translate.codeberg.org/projects/moshidon/values_sk/es/
2023-04-28 18:51:54 +00:00
nitrogenez47ab3e44720c4675
dfff3b8bcf Translated using Weblate (Ukrainian)
Currently translated at 100.0% (46 of 46 strings)

Translation: Moshidon/values
Translate-URL: https://translate.codeberg.org/projects/moshidon/values/uk/
2023-04-28 18:51:54 +00:00
LucasGGamerM
4e13f868fd fix(notificationsListFragment): fix crash when notification markers are null
This would happen when an account had 0 notifications and received one. After which, the user would tap on the notification icon on the tab bar and the app would crash.
Merge this @sk22, as this is a thing that might also happen on megalodon
2023-04-28 15:10:14 -03:00
LucasGGamerM
251ffbba8d feat: add follow back notification action 2023-04-28 15:00:34 -03:00
LucasGGamerM
01ae9ba7f5 fix: re-add missing drawable
This is the second commit for that, now I added it to git
2023-04-27 15:40:58 -03:00
LucasGGamerM
df1df28e23 fix: use enableAutoFabHide instead of autoFabHide 2023-04-27 15:35:53 -03:00
LucasGGamerM
23b2603a5f refactor: change withComposeButton to wantsComposeButton 2023-04-27 15:33:46 -03:00
LucasGGamerM
1e6dadd7ab Merge remote-tracking branch 'megalodon_main/main'
# Conflicts:
#	mastodon/src/main/java/org/joinmastodon/android/fragments/BaseStatusListFragment.java
#	mastodon/src/main/java/org/joinmastodon/android/fragments/HomeTabFragment.java
#	mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java
#	mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/StatusDisplayItem.java
2023-04-27 15:30:58 -03:00
LucasGGamerM
26ab5a7f55 build: re-add missing drawable 2023-04-27 15:14:02 -03:00
Luna!
d7b76ed70a Fixed a typo in a comment in blocks.tsv (#509) 2023-04-27 17:49:15 +02:00
gallegonovato
bc7946dc23 Translated using Weblate (Spanish)
Currently translated at 100.0% (46 of 46 strings)

Translation: Moshidon/values
Translate-URL: https://translate.codeberg.org/projects/moshidon/values/es/
2023-04-26 00:11:15 +00:00
LucasGGamerM
3a34599c82 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (46 of 46 strings)

Translation: Moshidon/values
Translate-URL: https://translate.codeberg.org/projects/moshidon/values/pt_BR/
2023-04-26 00:11:15 +00:00
Eryk Michalak
0a6dd8a754 Translated using Weblate (Polish)
Currently translated at 100.0% (46 of 46 strings)

Translation: Moshidon/values
Translate-URL: https://translate.codeberg.org/projects/moshidon/values/pl/
2023-04-26 00:11:15 +00:00
MKCOOL142
a61ece13af Translated using Weblate (German)
Currently translated at 100.0% (273 of 273 strings)

Translation: Moshidon/values_sk
Translate-URL: https://translate.codeberg.org/projects/moshidon/values_sk/de/
2023-04-26 00:11:14 +00:00
MKCOOL142
89e58fa947 Translated using Weblate (German)
Currently translated at 100.0% (33 of 33 strings)

Translation: Moshidon/metadata
Translate-URL: https://translate.codeberg.org/projects/moshidon/metadata/de/
2023-04-26 00:11:14 +00:00
LucasGGamerM
4c47bb0768 Merge branch 'master' of https://github.com/LucasGGamerM/moshidon 2023-04-25 20:57:15 -03:00
LucasGGamerM
82005bf3bd feat: swap correct icon for mention reblogger automatically setting 2023-04-25 20:56:53 -03:00
LucasGGamerM
03d89ae93c docs: add donation link
Why didnt I do this earlier?
2023-04-24 17:19:03 -03:00
sk
2e84faa505 update languages 2023-04-23 17:08:51 +02:00
sk
e7e8d13d9e fix auto hide fab in profile fragment 2023-04-22 22:33:20 +02:00
sk
a683c2cb11 hide fab in notifications 2023-04-22 22:20:40 +02:00
sk
addf7de316 single fab for home tabs
closes sk22#415
2023-04-22 21:25:02 +02:00
sk
44d4eada51 fix "load missing more" being hidden
closes sk22#482
2023-04-22 20:14:07 +02:00
sk
40bfdea5b1 fix pleroma emoji reaction notifications 2023-04-22 19:52:46 +02:00
sk
55138c1e86 fix wrong true black badge border color
closes sk22#485
2023-04-22 19:17:12 +02:00
sk
0aef680572 Merge remote-tracking branch 'weblate/main' 2023-04-22 19:06:03 +02:00
sk22
6dc37d6bde Translated using Weblate (German)
Currently translated at 100.0% (275 of 275 strings)

Translation: Megalodon/values
Translate-URL: https://translate.codeberg.org/projects/megalodon/values/de/
2023-04-22 17:05:32 +00:00
sk
60ea7cedf6 support glitch react notification 2023-04-22 19:05:14 +02:00
Espasant3
c986b10e14 Translated using Weblate (Galician)
Currently translated at 99.6% (272 of 273 strings)

Translation: Megalodon/values
Translate-URL: https://translate.codeberg.org/projects/megalodon/values/gl/
2023-04-22 17:00:55 +00:00
Choukajohn
d52174bd9e Translated using Weblate (French)
Currently translated at 100.0% (273 of 273 strings)

Translation: Megalodon/values
Translate-URL: https://translate.codeberg.org/projects/megalodon/values/fr/
2023-04-22 17:00:55 +00:00
sk22
c65d138911 Translated using Weblate (German)
Currently translated at 100.0% (273 of 273 strings)

Translation: Megalodon/values
Translate-URL: https://translate.codeberg.org/projects/megalodon/values/de/
2023-04-22 17:00:55 +00:00
sk
ad9bb8ad58 support glitch react notification 2023-04-22 19:00:37 +02:00
219 changed files with 1257 additions and 691 deletions

5
FAQ.md Normal file
View File

@@ -0,0 +1,5 @@
## F.A.Q
Q: What are the main differences between Moshidon and Megalodon?
A: There are many, but the most outstanding differences are: the ability to have other server's local timeline inside the app. It can be acessed in the "Add community" option in the top right corner of the Edit timelines screen. Other outstanding features that Moshidon has are some quality of life improvements, such as notification actions and allowing for unlisted replies by default. Most other features are pretty minor, such as profile notes directly available in the person's profile. Other features are quite minor usability and visibility improvements. All of which can be found in the settings page.

View File

@@ -18,27 +18,27 @@
   
<a href="https://apt.izzysoft.de/fdroid/index/apk/org.joinmastodon.android.moshinda"><img height="50" alt="Get it on IzzyOnDroid" src="img/izzy-badge.png"></a> <a href="https://apt.izzysoft.de/fdroid/index/apk/org.joinmastodon.android.moshinda"><img height="50" alt="Get it on IzzyOnDroid" src="img/izzy-badge.png"></a>
--- ## Help out the project by donating at: https://github.com/sponsors/LucasGGamerM!
## F.A.Q
### Q: What are the main differences between Moshidon and Megalodon?
### A: There are many, but the most outstanding differences are: the ability to have other server's local timeline inside the app. It can be acessed in the "Add community" option in the top right corner of the Edit timelines screen. Other outstanding features that Moshidon has are some quality of life improvements, such as notification actions and allowing for unlisted replies by default. Most other features are pretty minor, such as profile notes directly available in the person's profile. Other features are quite minor usability and visibility improvements. All of which can be found in the settings page.
--- ---
## Key features ## Key features
### **The ability to add new custom local timelines!** ### **The ability to add other server's local timeline to your timelines**
#### It can be accessed in the "Edit timelines" menu, where you can add a new "Community" to see other server's local posts! It can be accessed in the "Edit timelines" menu, where you can add a new "Community" to see other server's local posts!
### **Material you theme support on Android 12+ devices!** ### **View remote profiles**
### **Show posts filtered with a warning!** You can now see all of a profile follows and followers, by directly loading them from the profile's home instance. In case of a failed lookup, the app will automatically fall back to the older method.
**Allows you to have filtered posts collapsed with a warning! As shown in the screenshots:** ### **Translate posts easily**
Allows you to easily translate posts in another language with a translate button! Your instance must support translation, otherwise it will not work.
### **Show posts filtered with a warning**
Allows you to have filtered posts collapsed with a warning! As shown in the screenshots:
Before | After Before | After
:-------------------------:|:-------------------------: :-------------------------:|:-------------------------:
@@ -47,7 +47,7 @@ Before | After
### **Color themes** ### **Color themes**
**Allows you to change theme within the app. Supports Purple, pink, green, blue, red, orange, yellow and Nord!** Allows you to change theme within the app. Supports Material You, purple, pink, green, blue, red, orange, yellow and Nord!
### **Unlisted posting** ### **Unlisted posting**
@@ -71,6 +71,10 @@ Thats one of the reasons why choosing a small, **well-moderated instance is i
This is important to **ensure the content youre sharing is as accessible as possible** to people who cant see the images and rely on software to read back the provided content descriptions. Thankfully, its quite common for people on the Fediverse to provide such alt texts, and hopefully things stay this way! This is important to **ensure the content youre sharing is as accessible as possible** to people who cant see the images and rely on software to read back the provided content descriptions. Thankfully, its quite common for people on the Fediverse to provide such alt texts, and hopefully things stay this way!
### **Reminder to add alt text to attached media**
By default, Moshidon will show a warning to add alt text if your post has any attachments without any alt text. This is for better accessibility, and it can easily be bypassed and disabled in settings.
### **Pinning posts** ### **Pinning posts**
**This lets you can highlight important posts on your profile. A dedicated “Pinned” tab in peoples profiles shows all the posts they pinned.** **This lets you can highlight important posts on your profile. A dedicated “Pinned” tab in peoples profiles shows all the posts they pinned.**
@@ -95,12 +99,22 @@ Moshidon is also available in [IzzyOnDroid repo](https://apt.izzysoft.de/fdroid/
## Release variants ## Release variants
All downloads can be found on the [Releases](https://github.com/LucasGGamerM/moshidon/releases) page. ### Stable variant
All stable version downloads can be found on the [Releases](https://github.com/LucasGGamerM/moshidon/releases) page.
**`moshidon.apk`** **`moshidon.apk`**
Variant with an integrated updater. If you download Moshidon from here (and not from an app store), just download the regular `moshidon.apk`. Variant with an integrated updater. If you download Moshidon from here (and not from an app store), just download the regular `moshidon.apk`.
### Nightly variant
All nightly builds can be downloaded at [Nightly Releases](https://github.com/LucasGGamerM/moshidon-nightly/releases) page.
**`moshidon-nightly.apk`**
Unstable variant with an integrated updater. It's for development and testing purposes. If you find any bugs with it, please file a bug report at our [issues](https://github.com/LucasGGamerM/moshidon/issues) page.
--- ---
@@ -108,16 +122,18 @@ Variant with an integrated updater. If you download Moshidon from here (and not
### Features ### Features
* [Adding the ability to view other server's local timelines](https://github.com/LucasGGamerM/moshidon/tree/feature/local-timelines)
* [Adding the ability to load followers and following from remote instance](https://github.com/LucasGGamerM/moshidon/tree/feature/remote-followers)
* [Adding the ability to have filtered posts show with a warning](https://github.com/LucasGGamerM/moshidon/tree/feature/filters_again) * [Adding the ability to have filtered posts show with a warning](https://github.com/LucasGGamerM/moshidon/tree/feature/filters_again)
* [Add “Unlisted” as a post visibility option](https://github.com/mastodon/mastodon-android/compare/master...sk22:megalodon:feature/enable-unlisted) * [Add “Unlisted” as a post visibility option](https://github.com/mastodon/mastodon-android/compare/master...sk22:megalodon:feature/enable-unlisted)
([Pull request](https://github.com/mastodon/mastodon-android/pull/103)) ([Pull request](https://github.com/mastodon/mastodon-android/pull/103))
* Adding a useful private profile note box!* * Adding a useful private profile note box
* Auto hiding the compose button on scroll!* * Auto hiding the compose button on scroll
* Adding the ability to remind yourself to add alt text to images!* * Adding the ability to remind yourself to add alt text to images
* An indicator for if an image has alt text or not* * An indicator for if an image has alt text or not
* Adding the ability to have drafts!* * Adding the ability to have drafts
* Also adding the ability to view announcements from your instance!* * Also adding the ability to view announcements from your instance
* Adding the ability to post for local timeline only (Only on instances that support it!)* * Adding the ability to post for local timeline only (Only on instances that support it!)
* [Add image description button and viewer](https://github.com/mastodon/mastodon-android/compare/master...sk22:megalodon:feature/display-alt-text) ([Pull request](https://github.com/mastodon/mastodon-android/pull/129)) * [Add image description button and viewer](https://github.com/mastodon/mastodon-android/compare/master...sk22:megalodon:feature/display-alt-text) ([Pull request](https://github.com/mastodon/mastodon-android/pull/129))
* [Implement pinning posts and displaying pinned posts](https://github.com/mastodon/mastodon-android/compare/master...sk22:megalodon:feature/pin-posts) ([Pull request](https://github.com/mastodon/mastodon-android/pull/140)) * [Implement pinning posts and displaying pinned posts](https://github.com/mastodon/mastodon-android/compare/master...sk22:megalodon:feature/pin-posts) ([Pull request](https://github.com/mastodon/mastodon-android/pull/140))
* [Implement deleting and re-drafting](https://github.com/mastodon/mastodon-android/compare/master...sk22:megalodon:feature/delete-redraft) ([Closes issue](https://github.com/mastodon/mastodon-android/issues/21)) * [Implement deleting and re-drafting](https://github.com/mastodon/mastodon-android/compare/master...sk22:megalodon:feature/delete-redraft) ([Closes issue](https://github.com/mastodon/mastodon-android/issues/21))
@@ -139,6 +155,7 @@ Variant with an integrated updater. If you download Moshidon from here (and not
### Behavior ### Behavior
* Allow for confirmation before reblogging
* Adding a bottom option for the publish button, allowing for easier use on larger screens! * Adding a bottom option for the publish button, allowing for easier use on larger screens!
* [Make back button return to the home tab before exiting the app](https://github.com/mastodon/mastodon-android/compare/master...sk22:megalodon:feature/back-returns-home) ([Closes issue](https://github.com/mastodon/mastodon-android/issues/118)) * [Make back button return to the home tab before exiting the app](https://github.com/mastodon/mastodon-android/compare/master...sk22:megalodon:feature/back-returns-home) ([Closes issue](https://github.com/mastodon/mastodon-android/issues/118))
* [Always preserve content warnings when replying](https://github.com/mastodon/mastodon-android/compare/master...sk22:megalodon:feature/always-preserve-cw) ([Closes issue](https://github.com/mastodon/mastodon-android/issues/113)) * [Always preserve content warnings when replying](https://github.com/mastodon/mastodon-android/compare/master...sk22:megalodon:feature/always-preserve-cw) ([Closes issue](https://github.com/mastodon/mastodon-android/issues/113))
@@ -170,6 +187,10 @@ This project is released under the [GPL-3 License](./LICENSE).
## Links ## Links
[Official matrix chatroom:](https://matrix.to/#/#moshidon:matrix.org) https://matrix.to/#/#moshidon:matrix.org [F.A.Q](FAQ.md)
[Official matrix chatroom:](https://matrix.to/#/#moshidon:floss.social) https://matrix.to/#/#moshidon:floss.social
<a rel="me" href="https://floss.social/@moshidon">@moshidon<wbr>@floss.social</a> <a rel="me" href="https://floss.social/@moshidon">@moshidon<wbr>@floss.social</a>
---

View File

@@ -16,8 +16,8 @@ android {
applicationId "org.joinmastodon.android.moshinda" applicationId "org.joinmastodon.android.moshinda"
minSdk 23 minSdk 23
targetSdk 33 targetSdk 33
versionCode 99 versionCode 100
versionName "1.2.0+fork.99.moshinda" versionName "1.3.0+fork.100.moshinda"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
resourceConfigurations += ['ar-rSA', 'ar-rDZ', 'be-rBY', 'bn-rBD', 'bs-rBA', 'ca-rES', 'cs-rCZ', 'da-rDK', 'de-rDE', 'el-rGR', 'es-rES', 'eu-rES', 'fa-rIR', 'fi-rFI', 'fil-rPH', 'fr-rFR', 'ga-rIE', 'gd-rGB', 'gl-rES', 'hi-rIN', 'hr-rHR', 'hu-rHU', 'hy-rAM', 'ig-rNG', 'in-rID', 'is-rIS', 'it-rIT', 'iw-rIL', 'ja-rJP', 'kab', 'ko-rKR', 'my-rMM', 'nl-rNL', 'no-rNO', 'oc-rFR', 'pl-rPL', 'pt-rBR', 'pt-rPT', 'ro-rRO', 'ru-rRU', 'si-rLK', 'sl-rSI', 'sv-rSE', 'th-rTH', 'tr-rTR', 'uk-rUA', 'ur-rIN', 'vi-rVN', 'zh-rCN', 'zh-rTW'] resourceConfigurations += ['ar-rSA', 'ar-rDZ', 'be-rBY', 'bn-rBD', 'bs-rBA', 'ca-rES', 'cs-rCZ', 'da-rDK', 'de-rDE', 'el-rGR', 'es-rES', 'eu-rES', 'fa-rIR', 'fi-rFI', 'fil-rPH', 'fr-rFR', 'ga-rIE', 'gd-rGB', 'gl-rES', 'hi-rIN', 'hr-rHR', 'hu-rHU', 'hy-rAM', 'ig-rNG', 'in-rID', 'is-rIS', 'it-rIT', 'iw-rIL', 'ja-rJP', 'kab', 'ko-rKR', 'my-rMM', 'nl-rNL', 'no-rNO', 'oc-rFR', 'pl-rPL', 'pt-rBR', 'pt-rPT', 'ro-rRO', 'ru-rRU', 'si-rLK', 'sl-rSI', 'sv-rSE', 'th-rTH', 'tr-rTR', 'uk-rUA', 'ur-rIN', 'vi-rVN', 'zh-rCN', 'zh-rTW']
} }
@@ -91,7 +91,7 @@ android {
setRoot "src/github" setRoot "src/github"
} }
debug { debug {
setRoot "src/github" setRoot "src/debug"
} }
} }
namespace 'org.joinmastodon.android' namespace 'org.joinmastodon.android'

View File

@@ -1,10 +1,8 @@
package org.joinmastodon.android.test; package org.joinmastodon.android.test;
import android.app.Instrumentation;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.os.Environment;
import android.view.View; import android.view.View;
import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodManager;
@@ -14,10 +12,10 @@ import org.joinmastodon.android.GlobalUserPreferences;
import org.joinmastodon.android.MainActivity; import org.joinmastodon.android.MainActivity;
import org.joinmastodon.android.MastodonApp; import org.joinmastodon.android.MastodonApp;
import org.joinmastodon.android.R; import org.joinmastodon.android.R;
import org.joinmastodon.android.api.requests.instance.GetInstance; import org.joinmastodon.android.api.mastodon.requests.instance.GetInstance;
import org.joinmastodon.android.api.requests.statuses.GetStatusByID; import org.joinmastodon.android.api.mastodon.requests.statuses.GetStatusByID;
import org.joinmastodon.android.api.session.AccountSession; import org.joinmastodon.android.api.mastodon.session.AccountSession;
import org.joinmastodon.android.api.session.AccountSessionManager; import org.joinmastodon.android.api.mastodon.session.AccountSessionManager;
import org.joinmastodon.android.fragments.ComposeFragment; import org.joinmastodon.android.fragments.ComposeFragment;
import org.joinmastodon.android.fragments.ThreadFragment; import org.joinmastodon.android.fragments.ThreadFragment;
import org.joinmastodon.android.fragments.onboarding.InstanceRulesFragment; import org.joinmastodon.android.fragments.onboarding.InstanceRulesFragment;
@@ -32,12 +30,9 @@ import org.parceler.Parcels;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.util.concurrent.BrokenBarrierException;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.CyclicBarrier; import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.TimeoutException; import java.util.concurrent.TimeoutException;
import androidx.test.core.app.ActivityScenario;
import androidx.test.espresso.PerformException; import androidx.test.espresso.PerformException;
import androidx.test.espresso.UiController; import androidx.test.espresso.UiController;
import androidx.test.espresso.ViewAction; import androidx.test.espresso.ViewAction;
@@ -47,18 +42,15 @@ import androidx.test.ext.junit.rules.ActivityScenarioRule;
import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.LargeTest; import androidx.test.filters.LargeTest;
import androidx.test.platform.app.InstrumentationRegistry; import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.runner.screenshot.ScreenCapture;
import androidx.test.runner.screenshot.Screenshot; import androidx.test.runner.screenshot.Screenshot;
import me.grishka.appkit.api.Callback; import me.grishka.appkit.api.Callback;
import me.grishka.appkit.api.ErrorResponse; import me.grishka.appkit.api.ErrorResponse;
import okio.BufferedSink; import okio.BufferedSink;
import okio.Okio; import okio.Okio;
import okio.Sink;
import okio.Source; import okio.Source;
import static androidx.test.espresso.Espresso.*; import static androidx.test.espresso.Espresso.*;
import static androidx.test.espresso.action.ViewActions.*; import static androidx.test.espresso.action.ViewActions.*;
import static androidx.test.espresso.assertion.ViewAssertions.*;
import static androidx.test.espresso.matcher.ViewMatchers.*; import static androidx.test.espresso.matcher.ViewMatchers.*;
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)

View File

@@ -0,0 +1,369 @@
package org.joinmastodon.android.updater;
import android.app.Activity;
import android.app.DownloadManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.pm.PackageInstaller;
import android.database.Cursor;
import android.net.Uri;
import android.os.Build;
import android.util.Log;
import android.widget.Toast;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import org.joinmastodon.android.BuildConfig;
import org.joinmastodon.android.E;
import org.joinmastodon.android.GlobalUserPreferences;
import org.joinmastodon.android.MastodonApp;
import org.joinmastodon.android.R;
import org.joinmastodon.android.api.MastodonAPIController;
import org.joinmastodon.android.events.SelfUpdateStateChangedEvent;
import java.io.File;
import java.time.Instant;
import java.time.LocalDateTime;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import androidx.annotation.Keep;
import okhttp3.Call;
import okhttp3.Request;
import okhttp3.Response;
@Keep
public class GithubSelfUpdaterImpl extends GithubSelfUpdater{
private static final long CHECK_PERIOD=6*3600*1000L;
private static final String TAG="GithubSelfUpdater";
private UpdateState state=UpdateState.NO_UPDATE;
private UpdateInfo info;
private long downloadID;
private BroadcastReceiver downloadCompletionReceiver=new BroadcastReceiver(){
@Override
public void onReceive(Context context, Intent intent){
if(downloadID!=0 && intent.getLongExtra(DownloadManager.EXTRA_DOWNLOAD_ID, 0)==downloadID){
MastodonApp.context.unregisterReceiver(this);
setState(UpdateState.DOWNLOADED);
}
}
};
public GithubSelfUpdaterImpl(){
SharedPreferences prefs=getPrefs();
int checkedByBuild=prefs.getInt("checkedByBuild", 0);
if(prefs.contains("version") && checkedByBuild==BuildConfig.VERSION_CODE){
info=new UpdateInfo();
info.version=prefs.getString("version", null);
info.size=prefs.getLong("apkSize", 0);
info.changelog=prefs.getString("changelog", null);
downloadID=prefs.getLong("downloadID", 0);
if(downloadID==0 || !getUpdateApkFile().exists()){
state=UpdateState.UPDATE_AVAILABLE;
}else{
DownloadManager dm=MastodonApp.context.getSystemService(DownloadManager.class);
state=dm.getUriForDownloadedFile(downloadID)==null ? UpdateState.DOWNLOADING : UpdateState.DOWNLOADED;
if(state==UpdateState.DOWNLOADING){
MastodonApp.context.registerReceiver(downloadCompletionReceiver, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
}
}
}else if(checkedByBuild!=BuildConfig.VERSION_CODE && checkedByBuild>0){
// We are in a new version, running for the first time after update. Gotta clean things up.
long id=getPrefs().getLong("downloadID", 0);
if(id!=0){
MastodonApp.context.getSystemService(DownloadManager.class).remove(id);
}
getUpdateApkFile().delete();
getPrefs().edit()
.remove("apkSize")
.remove("version")
.remove("apkURL")
.remove("checkedByBuild")
.remove("downloadID")
.remove("changelog")
.apply();
}
}
private SharedPreferences getPrefs(){
return MastodonApp.context.getSharedPreferences("githubUpdater", Context.MODE_PRIVATE);
}
@Override
public void maybeCheckForUpdates(){
if(state!=UpdateState.NO_UPDATE && state!=UpdateState.UPDATE_AVAILABLE)
return;
long timeSinceLastCheck=System.currentTimeMillis()-getPrefs().getLong("lastCheck", CHECK_PERIOD);
if(timeSinceLastCheck>=CHECK_PERIOD){
setState(UpdateState.CHECKING);
MastodonAPIController.runInBackground(this::actuallyCheckForUpdates);
}
}
@Override
public void checkForUpdates() {
setState(UpdateState.CHECKING);
MastodonAPIController.runInBackground(this::actuallyCheckForUpdates);
}
private void actuallyCheckForUpdates(){
Request req=new Request.Builder()
.url("https://api.github.com/repos/LucasGGamerM/moshidon/releases")
.build();
Call call=MastodonAPIController.getHttpClient().newCall(req);
try(Response resp=call.execute()){
JsonArray arr=JsonParser.parseReader(resp.body().charStream()).getAsJsonArray();
for (JsonElement jsonElement : arr) {
JsonObject obj = jsonElement.getAsJsonObject();
if (obj.get("prerelease").getAsBoolean() && !GlobalUserPreferences.enablePreReleases) continue;
String tag=obj.get("tag_name").getAsString();
String changelog=obj.get("body").getAsString();
Pattern pattern=Pattern.compile("v?(\\d+)\\.(\\d+)\\.(\\d+)\\+fork\\.(\\d+)");
Matcher matcher=pattern.matcher(tag);
if(!matcher.find()){
Log.w(TAG, "actuallyCheckForUpdates: release tag has wrong format: "+tag);
return;
}
int newMajor=Integer.parseInt(matcher.group(1)),
newMinor=Integer.parseInt(matcher.group(2)),
newRevision=Integer.parseInt(matcher.group(3)),
newForkNumber=Integer.parseInt(matcher.group(4));
matcher=pattern.matcher(BuildConfig.VERSION_NAME);
String[] currentParts=BuildConfig.VERSION_NAME.split("[.+]");
if(!matcher.find()){
Log.w(TAG, "actuallyCheckForUpdates: current version has wrong format: "+BuildConfig.VERSION_NAME);
return;
}
int curMajor=Integer.parseInt(matcher.group(1)),
curMinor=Integer.parseInt(matcher.group(2)),
curRevision=Integer.parseInt(matcher.group(3)),
curForkNumber=Integer.parseInt(matcher.group(4));
long newVersion=((long)newMajor << 32) | ((long)newMinor << 16) | newRevision;
long curVersion=((long)curMajor << 32) | ((long)curMinor << 16) | curRevision;
if(newVersion>curVersion || newForkNumber>curForkNumber){
String version=newMajor+"."+newMinor+"."+newRevision+"+fork."+newForkNumber;
Log.d(TAG, "actuallyCheckForUpdates: new version: "+version);
for(JsonElement el:obj.getAsJsonArray("assets")){
JsonObject asset=el.getAsJsonObject();
if("moshidon.apk".equals(asset.get("name").getAsString()) && "application/vnd.android.package-archive".equals(asset.get("content_type").getAsString()) && "uploaded".equals(asset.get("state").getAsString())){
long size=asset.get("size").getAsLong();
String url=asset.get("browser_download_url").getAsString();
UpdateInfo info=new UpdateInfo();
info.size=size;
info.version=version;
info.changelog=changelog;
this.info=info;
getPrefs().edit()
.putLong("apkSize", size)
.putString("version", version)
.putString("apkURL", url)
.putString("changelog", changelog)
.putInt("checkedByBuild", BuildConfig.VERSION_CODE)
.remove("downloadID")
.apply();
break;
}
}
}
getPrefs().edit().putLong("lastCheck", System.currentTimeMillis()).apply();
break;
}
}catch(Exception x){
Log.w(TAG, "actuallyCheckForUpdates", x);
}finally{
setState(info==null ? UpdateState.NO_UPDATE : UpdateState.UPDATE_AVAILABLE);
}
}
private void setState(UpdateState state){
this.state=state;
E.post(new SelfUpdateStateChangedEvent(state));
}
@Override
public UpdateState getState(){
return state;
}
@Override
public UpdateInfo getUpdateInfo(){
return info;
}
public File getUpdateApkFile(){
return new File(MastodonApp.context.getExternalCacheDir(), "update.apk");
}
@Override
public void downloadUpdate(){
if(state==UpdateState.DOWNLOADING)
throw new IllegalStateException();
DownloadManager dm=MastodonApp.context.getSystemService(DownloadManager.class);
MastodonApp.context.registerReceiver(downloadCompletionReceiver, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
downloadID=dm.enqueue(
new DownloadManager.Request(Uri.parse(getPrefs().getString("apkURL", null)))
.setDestinationUri(Uri.fromFile(getUpdateApkFile()))
);
getPrefs().edit().putLong("downloadID", downloadID).apply();
setState(UpdateState.DOWNLOADING);
}
@Override
public void installUpdate(Activity activity){
if(state!=UpdateState.DOWNLOADED)
throw new IllegalStateException();
Uri uri;
Intent intent=new Intent(Intent.ACTION_INSTALL_PACKAGE);
if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.N){
uri=new Uri.Builder().scheme("content").authority(activity.getPackageName()+".self_update_provider").path("update.apk").build();
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
}else{
uri=Uri.fromFile(getUpdateApkFile());
}
intent.setDataAndType(uri, "application/vnd.android.package-archive");
activity.startActivity(intent);
// TODO figure out how to restart the app when updating via this new API
/*
PackageInstaller installer=activity.getPackageManager().getPackageInstaller();
try{
final int sid=installer.createSession(new PackageInstaller.SessionParams(PackageInstaller.SessionParams.MODE_FULL_INSTALL));
installer.registerSessionCallback(new PackageInstaller.SessionCallback(){
@Override
public void onCreated(int i){
}
@Override
public void onBadgingChanged(int i){
}
@Override
public void onActiveChanged(int i, boolean b){
}
@Override
public void onProgressChanged(int id, float progress){
}
@Override
public void onFinished(int id, boolean success){
activity.getPackageManager().setComponentEnabledSetting(new ComponentName(activity, AfterUpdateRestartReceiver.class), PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
}
});
activity.getPackageManager().setComponentEnabledSetting(new ComponentName(activity, AfterUpdateRestartReceiver.class), PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP);
PackageInstaller.Session session=installer.openSession(sid);
try(OutputStream out=session.openWrite("mastodon.apk", 0, info.size); InputStream in=new FileInputStream(getUpdateApkFile())){
byte[] buffer=new byte[16384];
int read;
while((read=in.read(buffer))>0){
out.write(buffer, 0, read);
}
}
// PendingIntent intent=PendingIntent.getBroadcast(activity, 1, new Intent(activity, InstallerStatusReceiver.class), PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_MUTABLE);
PendingIntent intent=PendingIntent.getActivity(activity, 1, new Intent(activity, MainActivity.class), PendingIntent.FLAG_UPDATE_CURRENT);
session.commit(intent.getIntentSender());
}catch(IOException x){
Log.w(TAG, "installUpdate", x);
Toast.makeText(activity, x.getMessage(), Toast.LENGTH_SHORT).show();
}
*/
}
@Override
public float getDownloadProgress(){
if(state!=UpdateState.DOWNLOADING)
throw new IllegalStateException();
DownloadManager dm=MastodonApp.context.getSystemService(DownloadManager.class);
try(Cursor cursor=dm.query(new DownloadManager.Query().setFilterById(downloadID))){
if(cursor.moveToFirst()){
long loaded=cursor.getLong(cursor.getColumnIndexOrThrow(DownloadManager.COLUMN_BYTES_DOWNLOADED_SO_FAR));
long total=cursor.getLong(cursor.getColumnIndexOrThrow(DownloadManager.COLUMN_TOTAL_SIZE_BYTES));
// Log.d(TAG, "getDownloadProgress: "+loaded+" of "+total);
return total>0 ? (float)loaded/total : 0f;
}
}
return 0;
}
@Override
public void cancelDownload(){
if(state!=UpdateState.DOWNLOADING)
throw new IllegalStateException();
DownloadManager dm=MastodonApp.context.getSystemService(DownloadManager.class);
dm.remove(downloadID);
downloadID=0;
getPrefs().edit().remove("downloadID").apply();
setState(UpdateState.UPDATE_AVAILABLE);
}
@Override
public void handleIntentFromInstaller(Intent intent, Activity activity){
int status=intent.getIntExtra(PackageInstaller.EXTRA_STATUS, 0);
if(status==PackageInstaller.STATUS_PENDING_USER_ACTION){
Intent confirmIntent=intent.getParcelableExtra(Intent.EXTRA_INTENT);
activity.startActivity(confirmIntent);
}else if(status!=PackageInstaller.STATUS_SUCCESS){
String msg=intent.getStringExtra(PackageInstaller.EXTRA_STATUS_MESSAGE);
Toast.makeText(activity, activity.getString(R.string.error)+":\n"+msg, Toast.LENGTH_LONG).show();
}
}
/*public static class InstallerStatusReceiver extends BroadcastReceiver{
@Override
public void onReceive(Context context, Intent intent){
int status=intent.getIntExtra(PackageInstaller.EXTRA_STATUS, 0);
if(status==PackageInstaller.STATUS_PENDING_USER_ACTION){
Intent confirmIntent=intent.getParcelableExtra(Intent.EXTRA_INTENT);
context.startActivity(confirmIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
}else if(status!=PackageInstaller.STATUS_SUCCESS){
String msg=intent.getStringExtra(PackageInstaller.EXTRA_STATUS_MESSAGE);
Toast.makeText(context, context.getString(R.string.error)+":\n"+msg, Toast.LENGTH_LONG).show();
}
}
}
public static class AfterUpdateRestartReceiver extends BroadcastReceiver{
@Override
public void onReceive(Context context, Intent intent){
if(Intent.ACTION_MY_PACKAGE_REPLACED.equals(intent.getAction())){
context.getPackageManager().setComponentEnabledSetting(new ComponentName(context, AfterUpdateRestartReceiver.class), PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
Toast.makeText(context, R.string.update_installed, Toast.LENGTH_SHORT).show();
Intent restartIntent=new Intent(context, MainActivity.class)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
.setPackage(context.getPackageName());
if(Build.VERSION.SDK_INT<Build.VERSION_CODES.P){
context.startActivity(restartIntent);
}else{
// Bypass activity starting restrictions by starting it from a notification
NotificationManager nm=context.getSystemService(NotificationManager.class);
NotificationChannel chan=new NotificationChannel("selfUpdateRestart", context.getString(R.string.update_installed), NotificationManager.IMPORTANCE_HIGH);
nm.createNotificationChannel(chan);
Notification n=new Notification.Builder(context, "selfUpdateRestart")
.setContentTitle(context.getString(R.string.update_installed))
.setContentIntent(PendingIntent.getActivity(context, 1, restartIntent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE))
.setFullScreenIntent(PendingIntent.getActivity(context, 1, restartIntent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE), true)
.setSmallIcon(R.drawable.ic_ntf_logo)
.build();
nm.notify(1, n);
}
}
}
}*/
}

View File

@@ -0,0 +1,62 @@
package org.joinmastodon.android.updater;
import android.content.ContentProvider;
import android.content.ContentValues;
import android.database.Cursor;
import android.net.Uri;
import android.os.ParcelFileDescriptor;
import java.io.FileNotFoundException;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
public class SelfUpdateContentProvider extends ContentProvider{
@Override
public boolean onCreate(){
return true;
}
@Nullable
@Override
public Cursor query(@NonNull Uri uri, @Nullable String[] projection, @Nullable String selection, @Nullable String[] selectionArgs, @Nullable String sortOrder){
return null;
}
@Nullable
@Override
public String getType(@NonNull Uri uri){
if(isCorrectUri(uri))
return "application/vnd.android.package-archive";
return null;
}
@Nullable
@Override
public Uri insert(@NonNull Uri uri, @Nullable ContentValues values){
return null;
}
@Override
public int delete(@NonNull Uri uri, @Nullable String selection, @Nullable String[] selectionArgs){
return 0;
}
@Override
public int update(@NonNull Uri uri, @Nullable ContentValues values, @Nullable String selection, @Nullable String[] selectionArgs){
return 0;
}
@Nullable
@Override
public ParcelFileDescriptor openFile(@NonNull Uri uri, @NonNull String mode) throws FileNotFoundException{
if(isCorrectUri(uri)){
return ParcelFileDescriptor.open(((GithubSelfUpdaterImpl)GithubSelfUpdater.getInstance()).getUpdateApkFile(), ParcelFileDescriptor.MODE_READ_ONLY);
}
throw new FileNotFoundException();
}
private boolean isCorrectUri(Uri uri){
return "/update.apk".equals(uri.getPath());
}
}

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

Before

Width:  |  Height:  |  Size: 988 B

After

Width:  |  Height:  |  Size: 988 B

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -12,7 +12,7 @@ gab.protohype.net
social.unzensiert.to social.unzensiert.to
freeatlantis.com freeatlantis.com
# reactionary bigotry and hatespeech against magrinalized groups # reactionary bigotry and hatespeech against marginalized groups
poa.st poa.st
freespeechextremist.com freespeechextremist.com
rdrama.cc rdrama.cc
1 # lists.d Mastodon Blocklist (c) 2022 Greyhat Academy LICENSED UNDER: CC-BY-NC-SA 4.0
12 # reactionary bigotry and hatespeech against magrinalized groups reactionary bigotry and hatespeech against marginalized groups
13 poa.st
14 freespeechextremist.com
15 rdrama.cc
16 outpoa.st
17 anime.website
18 gameliberty.club

View File

@@ -1,62 +1,5 @@
package org.joinmastodon.android; package org.joinmastodon.android;
import android.app.Activity;
import android.app.NotificationManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.ShortcutInfo;
import android.content.pm.ShortcutManager;
import android.graphics.drawable.Icon;
import android.net.Uri;
import android.os.Build;
import android.util.Log;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.browser.customtabs.CustomTabsIntent;
import org.joinmastodon.android.api.MastodonAPIController;
import org.joinmastodon.android.api.PushSubscriptionManager;
import org.joinmastodon.android.api.requests.accounts.GetOwnAccount;
import org.joinmastodon.android.api.requests.accounts.GetPreferences;
import org.joinmastodon.android.api.requests.accounts.GetWordFilters;
import org.joinmastodon.android.api.requests.instance.GetCustomEmojis;
import org.joinmastodon.android.api.requests.instance.GetInstance;
import org.joinmastodon.android.api.requests.oauth.CreateOAuthApp;
import org.joinmastodon.android.api.session.AccountActivationInfo;
import org.joinmastodon.android.api.session.AccountSession;
import org.joinmastodon.android.api.session.AccountSessionManager;
import org.joinmastodon.android.events.EmojiUpdatedEvent;
import org.joinmastodon.android.model.Account;
import org.joinmastodon.android.model.Application;
import org.joinmastodon.android.model.Emoji;
import org.joinmastodon.android.model.EmojiCategory;
import org.joinmastodon.android.model.Filter;
import org.joinmastodon.android.model.Instance;
import org.joinmastodon.android.model.Preferences;
import org.joinmastodon.android.model.Token;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import me.grishka.appkit.api.Callback;
import me.grishka.appkit.api.ErrorResponse;
public class DomainManager { public class DomainManager {
private static final String TAG="DomainManager"; private static final String TAG="DomainManager";

View File

@@ -9,8 +9,8 @@ import android.os.Bundle;
import android.text.TextUtils; import android.text.TextUtils;
import android.widget.Toast; import android.widget.Toast;
import org.joinmastodon.android.api.session.AccountSession; import org.joinmastodon.android.api.mastodon.session.AccountSession;
import org.joinmastodon.android.api.session.AccountSessionManager; import org.joinmastodon.android.api.mastodon.session.AccountSessionManager;
import org.joinmastodon.android.fragments.ComposeFragment; import org.joinmastodon.android.fragments.ComposeFragment;
import org.joinmastodon.android.ui.AccountSwitcherSheet; import org.joinmastodon.android.ui.AccountSwitcherSheet;
import org.joinmastodon.android.ui.utils.UiUtils; import org.joinmastodon.android.ui.utils.UiUtils;

View File

@@ -11,8 +11,8 @@ import android.os.Bundle;
import android.util.Log; import android.util.Log;
import org.joinmastodon.android.api.ObjectValidationException; import org.joinmastodon.android.api.ObjectValidationException;
import org.joinmastodon.android.api.session.AccountSession; import org.joinmastodon.android.api.mastodon.session.AccountSession;
import org.joinmastodon.android.api.session.AccountSessionManager; import org.joinmastodon.android.api.mastodon.session.AccountSessionManager;
import org.joinmastodon.android.fragments.ComposeFragment; import org.joinmastodon.android.fragments.ComposeFragment;
import org.joinmastodon.android.fragments.HomeFragment; import org.joinmastodon.android.fragments.HomeFragment;
import org.joinmastodon.android.fragments.ProfileFragment; import org.joinmastodon.android.fragments.ProfileFragment;

View File

@@ -6,12 +6,11 @@ import android.content.Intent;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.Log;
import android.widget.Toast; import android.widget.Toast;
import org.joinmastodon.android.api.requests.accounts.GetOwnAccount; import org.joinmastodon.android.api.mastodon.requests.accounts.GetOwnAccount;
import org.joinmastodon.android.api.requests.oauth.GetOauthToken; import org.joinmastodon.android.api.mastodon.requests.oauth.GetOauthToken;
import org.joinmastodon.android.api.session.AccountSessionManager; import org.joinmastodon.android.api.mastodon.session.AccountSessionManager;
import org.joinmastodon.android.model.Account; import org.joinmastodon.android.model.Account;
import org.joinmastodon.android.model.Application; import org.joinmastodon.android.model.Application;
import org.joinmastodon.android.model.Instance; import org.joinmastodon.android.model.Instance;

View File

@@ -12,27 +12,25 @@ import android.content.BroadcastReceiver;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.opengl.Visibility;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.Log; import android.util.Log;
import org.joinmastodon.android.api.MastodonAPIController; import org.joinmastodon.android.api.MastodonAPIController;
import org.joinmastodon.android.api.requests.notifications.GetNotificationByID; import org.joinmastodon.android.api.mastodon.requests.accounts.SetAccountFollowed;
import org.joinmastodon.android.api.requests.statuses.CreateStatus; import org.joinmastodon.android.api.mastodon.requests.notifications.GetNotificationByID;
import org.joinmastodon.android.api.requests.statuses.SetStatusBookmarked; import org.joinmastodon.android.api.mastodon.requests.statuses.CreateStatus;
import org.joinmastodon.android.api.requests.statuses.SetStatusFavorited; import org.joinmastodon.android.api.mastodon.requests.statuses.SetStatusBookmarked;
import org.joinmastodon.android.api.requests.statuses.SetStatusReblogged; import org.joinmastodon.android.api.mastodon.requests.statuses.SetStatusFavorited;
import org.joinmastodon.android.api.session.AccountSession; import org.joinmastodon.android.api.mastodon.requests.statuses.SetStatusReblogged;
import org.joinmastodon.android.api.session.AccountSessionManager; import org.joinmastodon.android.api.mastodon.session.AccountSession;
import org.joinmastodon.android.api.mastodon.session.AccountSessionManager;
import org.joinmastodon.android.events.NotificationReceivedEvent; import org.joinmastodon.android.events.NotificationReceivedEvent;
import org.joinmastodon.android.model.Account; import org.joinmastodon.android.model.Account;
import org.joinmastodon.android.model.NotificationAction; import org.joinmastodon.android.model.NotificationAction;
import org.joinmastodon.android.model.Preferences; import org.joinmastodon.android.model.Preferences;
import org.joinmastodon.android.model.PushNotification; import org.joinmastodon.android.model.PushNotification;
import org.joinmastodon.android.model.Status;
import org.joinmastodon.android.model.StatusPrivacy;
import org.joinmastodon.android.model.StatusPrivacy; import org.joinmastodon.android.model.StatusPrivacy;
import org.joinmastodon.android.ui.utils.UiUtils; import org.joinmastodon.android.ui.utils.UiUtils;
import org.parceler.Parcels; import org.parceler.Parcels;
@@ -123,8 +121,16 @@ public class PushNotificationReceiver extends BroadcastReceiver{
if(intent.hasExtra("notification")){ if(intent.hasExtra("notification")){
org.joinmastodon.android.model.Notification notification=Parcels.unwrap(intent.getParcelableExtra("notification")); org.joinmastodon.android.model.Notification notification=Parcels.unwrap(intent.getParcelableExtra("notification"));
String statusID=notification.status.id; String statusID = null;
if (statusID != null) { String targetAccountID = null;
if(notification.status != null){
statusID = notification.status.id;
}
if(notification.account != null){
targetAccountID = notification.account.id;
}
if (statusID != null || targetAccountID != null) {
AccountSessionManager accountSessionManager = AccountSessionManager.getInstance(); AccountSessionManager accountSessionManager = AccountSessionManager.getInstance();
Preferences preferences = accountSessionManager.getAccount(accountID).preferences; Preferences preferences = accountSessionManager.getAccount(accountID).preferences;
@@ -134,6 +140,7 @@ public class PushNotificationReceiver extends BroadcastReceiver{
case BOOST -> new SetStatusReblogged(notification.status.id, true, preferences.postingDefaultVisibility).exec(accountID); case BOOST -> new SetStatusReblogged(notification.status.id, true, preferences.postingDefaultVisibility).exec(accountID);
case UNBOOST -> new SetStatusReblogged(notification.status.id, false, preferences.postingDefaultVisibility).exec(accountID); case UNBOOST -> new SetStatusReblogged(notification.status.id, false, preferences.postingDefaultVisibility).exec(accountID);
case REPLY -> handleReplyAction(context, accountID, intent, notification, notificationId, preferences); case REPLY -> handleReplyAction(context, accountID, intent, notification, notificationId, preferences);
case FOLLOW_BACK -> new SetAccountFollowed(notification.account.id, true, true, false).exec(accountID);
default -> Log.w(TAG, "onReceive: Failed to get NotificationAction"); default -> Log.w(TAG, "onReceive: Failed to get NotificationAction");
} }
} }
@@ -241,6 +248,9 @@ public class PushNotificationReceiver extends BroadcastReceiver{
if(notification.status.reblogged) if(notification.status.reblogged)
builder.addAction(buildNotificationAction(context, id, accountID, notification, context.getString(R.string.sk_undo_reblog), NotificationAction.UNBOOST)); builder.addAction(buildNotificationAction(context, id, accountID, notification, context.getString(R.string.sk_undo_reblog), NotificationAction.UNBOOST));
} }
case FOLLOW -> {
builder.addAction(buildNotificationAction(context, id, accountID, notification, context.getString(R.string.follow_back), NotificationAction.FOLLOW_BACK));
}
} }
} }

View File

@@ -11,15 +11,14 @@ import android.util.Log;
import org.joinmastodon.android.BuildConfig; import org.joinmastodon.android.BuildConfig;
import org.joinmastodon.android.MastodonApp; import org.joinmastodon.android.MastodonApp;
import org.joinmastodon.android.api.requests.notifications.GetNotifications; import org.joinmastodon.android.api.adapter.ApiAdapter;
import org.joinmastodon.android.api.requests.timelines.GetHomeTimeline; import org.joinmastodon.android.api.mastodon.requests.notifications.GetNotifications;
import org.joinmastodon.android.api.session.AccountSession; import org.joinmastodon.android.api.mastodon.session.AccountSession;
import org.joinmastodon.android.api.session.AccountSessionManager; import org.joinmastodon.android.api.mastodon.session.AccountSessionManager;
import org.joinmastodon.android.model.CacheablePaginatedResponse; import org.joinmastodon.android.model.CacheablePaginatedResponse;
import org.joinmastodon.android.model.Filter; import org.joinmastodon.android.model.Filter;
import org.joinmastodon.android.model.Instance; import org.joinmastodon.android.model.Instance;
import org.joinmastodon.android.model.Notification; import org.joinmastodon.android.model.Notification;
import org.joinmastodon.android.model.PaginatedResponse;
import org.joinmastodon.android.model.SearchResult; import org.joinmastodon.android.model.SearchResult;
import org.joinmastodon.android.model.Status; import org.joinmastodon.android.model.Status;
import org.joinmastodon.android.utils.StatusFilterPredicate; import org.joinmastodon.android.utils.StatusFilterPredicate;
@@ -88,7 +87,8 @@ public class CacheController{
Log.w(TAG, "getHomeTimeline: corrupted status object in database", x); Log.w(TAG, "getHomeTimeline: corrupted status object in database", x);
} }
} }
new GetHomeTimeline(maxID, null, count, null) ApiAdapter apiAdapter = new ApiAdapter(ApiAdapter.ServerType.MASTODON);
apiAdapter.getHomeTimeline(maxID, null, count, null)
.setCallback(new Callback<>(){ .setCallback(new Callback<>(){
@Override @Override
public void onSuccess(List<Status> result){ public void onSuccess(List<Status> result){

View File

@@ -15,7 +15,7 @@ import org.joinmastodon.android.BuildConfig;
import org.joinmastodon.android.MastodonApp; import org.joinmastodon.android.MastodonApp;
import org.joinmastodon.android.api.gson.IsoInstantTypeAdapter; import org.joinmastodon.android.api.gson.IsoInstantTypeAdapter;
import org.joinmastodon.android.api.gson.IsoLocalDateTypeAdapter; import org.joinmastodon.android.api.gson.IsoLocalDateTypeAdapter;
import org.joinmastodon.android.api.session.AccountSession; import org.joinmastodon.android.api.mastodon.session.AccountSession;
import org.joinmastodon.android.model.Status; import org.joinmastodon.android.model.Status;
import java.io.BufferedReader; import java.io.BufferedReader;

View File

@@ -9,8 +9,8 @@ import android.util.Pair;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;
import org.joinmastodon.android.BuildConfig; import org.joinmastodon.android.BuildConfig;
import org.joinmastodon.android.api.session.AccountSession; import org.joinmastodon.android.api.mastodon.session.AccountSession;
import org.joinmastodon.android.api.session.AccountSessionManager; import org.joinmastodon.android.api.mastodon.session.AccountSessionManager;
import org.joinmastodon.android.model.BaseModel; import org.joinmastodon.android.model.BaseModel;
import org.joinmastodon.android.model.Token; import org.joinmastodon.android.model.Token;

View File

@@ -12,10 +12,10 @@ import android.util.Log;
import org.joinmastodon.android.BuildConfig; import org.joinmastodon.android.BuildConfig;
import org.joinmastodon.android.MastodonApp; import org.joinmastodon.android.MastodonApp;
import org.joinmastodon.android.api.requests.notifications.RegisterForPushNotifications; import org.joinmastodon.android.api.mastodon.requests.notifications.RegisterForPushNotifications;
import org.joinmastodon.android.api.requests.notifications.UpdatePushSettings; import org.joinmastodon.android.api.mastodon.requests.notifications.UpdatePushSettings;
import org.joinmastodon.android.api.session.AccountSession; import org.joinmastodon.android.api.mastodon.session.AccountSession;
import org.joinmastodon.android.api.session.AccountSessionManager; import org.joinmastodon.android.api.mastodon.session.AccountSessionManager;
import org.joinmastodon.android.model.PushNotification; import org.joinmastodon.android.model.PushNotification;
import org.joinmastodon.android.model.PushSubscription; import org.joinmastodon.android.model.PushSubscription;
@@ -45,7 +45,6 @@ import javax.crypto.IllegalBlockSizeException;
import javax.crypto.KeyAgreement; import javax.crypto.KeyAgreement;
import javax.crypto.Mac; import javax.crypto.Mac;
import javax.crypto.NoSuchPaddingException; import javax.crypto.NoSuchPaddingException;
import javax.crypto.SecretKey;
import javax.crypto.spec.GCMParameterSpec; import javax.crypto.spec.GCMParameterSpec;
import javax.crypto.spec.SecretKeySpec; import javax.crypto.spec.SecretKeySpec;

View File

@@ -4,9 +4,9 @@ import android.os.Looper;
import org.joinmastodon.android.E; import org.joinmastodon.android.E;
import org.joinmastodon.android.MastodonApp; import org.joinmastodon.android.MastodonApp;
import org.joinmastodon.android.api.requests.statuses.SetStatusBookmarked; import org.joinmastodon.android.api.mastodon.requests.statuses.SetStatusBookmarked;
import org.joinmastodon.android.api.requests.statuses.SetStatusFavorited; import org.joinmastodon.android.api.mastodon.requests.statuses.SetStatusFavorited;
import org.joinmastodon.android.api.requests.statuses.SetStatusReblogged; import org.joinmastodon.android.api.mastodon.requests.statuses.SetStatusReblogged;
import org.joinmastodon.android.events.StatusCountersUpdatedEvent; import org.joinmastodon.android.events.StatusCountersUpdatedEvent;
import org.joinmastodon.android.model.Status; import org.joinmastodon.android.model.Status;
import org.joinmastodon.android.model.StatusPrivacy; import org.joinmastodon.android.model.StatusPrivacy;

View File

@@ -0,0 +1,47 @@
package org.joinmastodon.android.api.adapter;
import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.api.mastodon.requests.statuses.GetStatusByID;
import org.joinmastodon.android.api.mastodon.requests.timelines.GetHomeTimeline;
import org.joinmastodon.android.model.Status;
import java.util.List;
public class ApiAdapter {
public final ServerType serverType;
public ApiAdapter(ServerType serverType){
this.serverType = serverType;
}
public MastodonAPIRequest<?> getPostById(String id){
switch (serverType){
case MASTODON -> {
return new GetStatusByID(id);
}
case MISSKEY -> {
return null;
}
}
return null;
}
public MastodonAPIRequest<List<Status>> getHomeTimeline(String maxID, String minID, int limit, String sinceID){
switch (serverType){
case MASTODON -> {
return new GetHomeTimeline(maxID, minID, limit, sinceID);
}
case MISSKEY -> {
return null;
}
}
return null;
}
public enum ServerType {
MASTODON,
MISSKEY,
}
}

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests; package org.joinmastodon.android.api.mastodon.requests;
import android.net.Uri; import android.net.Uri;
import android.text.TextUtils; import android.text.TextUtils;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.accounts; package org.joinmastodon.android.api.mastodon.requests.accounts;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.model.Relationship; import org.joinmastodon.android.model.Relationship;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.accounts; package org.joinmastodon.android.api.mastodon.requests.accounts;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.model.Account; import org.joinmastodon.android.model.Account;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.accounts; package org.joinmastodon.android.api.mastodon.requests.accounts;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.model.Account; import org.joinmastodon.android.model.Account;

View File

@@ -1,8 +1,8 @@
package org.joinmastodon.android.api.requests.accounts; package org.joinmastodon.android.api.mastodon.requests.accounts;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;
import org.joinmastodon.android.api.requests.HeaderPaginationRequest; import org.joinmastodon.android.api.mastodon.requests.HeaderPaginationRequest;
import org.joinmastodon.android.model.Account; import org.joinmastodon.android.model.Account;
public class GetAccountFollowers extends HeaderPaginationRequest<Account>{ public class GetAccountFollowers extends HeaderPaginationRequest<Account>{

View File

@@ -1,8 +1,8 @@
package org.joinmastodon.android.api.requests.accounts; package org.joinmastodon.android.api.mastodon.requests.accounts;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;
import org.joinmastodon.android.api.requests.HeaderPaginationRequest; import org.joinmastodon.android.api.mastodon.requests.HeaderPaginationRequest;
import org.joinmastodon.android.model.Account; import org.joinmastodon.android.model.Account;
public class GetAccountFollowing extends HeaderPaginationRequest<Account>{ public class GetAccountFollowing extends HeaderPaginationRequest<Account>{

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.accounts; package org.joinmastodon.android.api.mastodon.requests.accounts;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.accounts; package org.joinmastodon.android.api.mastodon.requests.accounts;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;

View File

@@ -1,8 +1,8 @@
package org.joinmastodon.android.api.requests.accounts; package org.joinmastodon.android.api.mastodon.requests.accounts;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;
import org.joinmastodon.android.api.requests.HeaderPaginationRequest; import org.joinmastodon.android.api.mastodon.requests.HeaderPaginationRequest;
import org.joinmastodon.android.model.Account; import org.joinmastodon.android.model.Account;
public class GetFollowRequests extends HeaderPaginationRequest<Account>{ public class GetFollowRequests extends HeaderPaginationRequest<Account>{

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.accounts; package org.joinmastodon.android.api.mastodon.requests.accounts;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.accounts; package org.joinmastodon.android.api.mastodon.requests.accounts;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.model.Account; import org.joinmastodon.android.model.Account;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.accounts; package org.joinmastodon.android.api.mastodon.requests.accounts;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.model.Preferences; import org.joinmastodon.android.model.Preferences;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.accounts; package org.joinmastodon.android.api.mastodon.requests.accounts;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.accounts; package org.joinmastodon.android.api.mastodon.requests.accounts;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.model.Token; import org.joinmastodon.android.model.Token;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.accounts; package org.joinmastodon.android.api.mastodon.requests.accounts;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.model.Relationship; import org.joinmastodon.android.model.Relationship;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.accounts; package org.joinmastodon.android.api.mastodon.requests.accounts;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.accounts; package org.joinmastodon.android.api.mastodon.requests.accounts;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.model.Relationship; import org.joinmastodon.android.model.Relationship;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.accounts; package org.joinmastodon.android.api.mastodon.requests.accounts;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.model.Relationship; import org.joinmastodon.android.model.Relationship;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.accounts; package org.joinmastodon.android.api.mastodon.requests.accounts;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.model.Relationship; import org.joinmastodon.android.model.Relationship;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.accounts; package org.joinmastodon.android.api.mastodon.requests.accounts;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.accounts; package org.joinmastodon.android.api.mastodon.requests.accounts;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.model.Relationship; import org.joinmastodon.android.model.Relationship;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.accounts; package org.joinmastodon.android.api.mastodon.requests.accounts;
import android.net.Uri; import android.net.Uri;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.announcements; package org.joinmastodon.android.api.mastodon.requests.announcements;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.announcements; package org.joinmastodon.android.api.mastodon.requests.announcements;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.catalog; package org.joinmastodon.android.api.mastodon.requests.catalog;
import android.net.Uri; import android.net.Uri;
import android.text.TextUtils; import android.text.TextUtils;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.catalog; package org.joinmastodon.android.api.mastodon.requests.catalog;
import android.net.Uri; import android.net.Uri;
import android.text.TextUtils; import android.text.TextUtils;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.instance; package org.joinmastodon.android.api.mastodon.requests.instance;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.instance; package org.joinmastodon.android.api.mastodon.requests.instance;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.model.Instance; import org.joinmastodon.android.model.Instance;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.lists; package org.joinmastodon.android.api.mastodon.requests.lists;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import java.util.List; import java.util.List;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.lists; package org.joinmastodon.android.api.mastodon.requests.lists;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import java.util.List; import java.util.List;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.lists; package org.joinmastodon.android.api.mastodon.requests.lists;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.model.ListTimeline; import org.joinmastodon.android.model.ListTimeline;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.lists; package org.joinmastodon.android.api.mastodon.requests.lists;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.model.ListTimeline; import org.joinmastodon.android.model.ListTimeline;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.lists; package org.joinmastodon.android.api.mastodon.requests.lists;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import java.util.List; import java.util.List;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.lists; package org.joinmastodon.android.api.mastodon.requests.lists;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.model.ListTimeline; import org.joinmastodon.android.model.ListTimeline;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.lists; package org.joinmastodon.android.api.mastodon.requests.lists;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.lists; package org.joinmastodon.android.api.mastodon.requests.lists;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import java.util.List; import java.util.List;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.lists; package org.joinmastodon.android.api.mastodon.requests.lists;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import java.util.List; import java.util.List;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.lists; package org.joinmastodon.android.api.mastodon.requests.lists;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.model.ListTimeline; import org.joinmastodon.android.model.ListTimeline;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.markers; package org.joinmastodon.android.api.mastodon.requests.markers;
import org.joinmastodon.android.api.ApiUtils; import org.joinmastodon.android.api.ApiUtils;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.markers; package org.joinmastodon.android.api.mastodon.requests.markers;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.api.gson.JsonObjectBuilder; import org.joinmastodon.android.api.gson.JsonObjectBuilder;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.notifications; package org.joinmastodon.android.api.mastodon.requests.notifications;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.notifications; package org.joinmastodon.android.api.mastodon.requests.notifications;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.model.Notification; import org.joinmastodon.android.model.Notification;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.notifications; package org.joinmastodon.android.api.mastodon.requests.notifications;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.notifications; package org.joinmastodon.android.api.mastodon.requests.notifications;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.model.PushSubscription; import org.joinmastodon.android.model.PushSubscription;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.notifications; package org.joinmastodon.android.api.mastodon.requests.notifications;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.model.PushSubscription; import org.joinmastodon.android.model.PushSubscription;

View File

@@ -1,7 +1,7 @@
package org.joinmastodon.android.api.requests.oauth; package org.joinmastodon.android.api.mastodon.requests.oauth;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.api.session.AccountSessionManager; import org.joinmastodon.android.api.mastodon.session.AccountSessionManager;
import org.joinmastodon.android.model.Application; import org.joinmastodon.android.model.Application;
public class CreateOAuthApp extends MastodonAPIRequest<Application>{ public class CreateOAuthApp extends MastodonAPIRequest<Application>{

View File

@@ -1,9 +1,9 @@
package org.joinmastodon.android.api.requests.oauth; package org.joinmastodon.android.api.mastodon.requests.oauth;
import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.SerializedName;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.api.session.AccountSessionManager; import org.joinmastodon.android.api.mastodon.session.AccountSessionManager;
import org.joinmastodon.android.model.Token; import org.joinmastodon.android.model.Token;
public class GetOauthToken extends MastodonAPIRequest<Token>{ public class GetOauthToken extends MastodonAPIRequest<Token>{

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.oauth; package org.joinmastodon.android.api.mastodon.requests.oauth;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.polls; package org.joinmastodon.android.api.mastodon.requests.polls;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.model.Poll; import org.joinmastodon.android.model.Poll;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.reports; package org.joinmastodon.android.api.mastodon.requests.reports;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.model.ReportReason; import org.joinmastodon.android.model.ReportReason;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.search; package org.joinmastodon.android.api.mastodon.requests.search;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.model.SearchResults; import org.joinmastodon.android.model.SearchResults;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.statuses; package org.joinmastodon.android.api.mastodon.requests.statuses;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.model.ScheduledStatus; import org.joinmastodon.android.model.ScheduledStatus;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.statuses; package org.joinmastodon.android.api.mastodon.requests.statuses;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.model.Status; import org.joinmastodon.android.model.Status;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.statuses; package org.joinmastodon.android.api.mastodon.requests.statuses;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.model.Status; import org.joinmastodon.android.model.Status;

View File

@@ -1,4 +1,4 @@
package org.joinmastodon.android.api.requests.statuses; package org.joinmastodon.android.api.mastodon.requests.statuses;
import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.model.Attachment; import org.joinmastodon.android.model.Attachment;

Some files were not shown because too many files have changed in this diff Show More