forked from sk22/megalodon
-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'mastodon/master'
# Conflicts: # fastlane/metadata/android/fi-FI/full_description.txt # fastlane/metadata/android/th-TH/full_description.txt # mastodon/build.gradle # mastodon/src/main/java/org/joinmastodon/android/PushNotificationReceiver.java # mastodon/src/main/java/org/joinmastodon/android/api/requests/statuses/TranslateStatus.java # mastodon/src/main/java/org/joinmastodon/android/api/session/AccountSession.java # mastodon/src/main/java/org/joinmastodon/android/api/session/AccountSessionManager.java # mastodon/src/main/java/org/joinmastodon/android/fragments/BaseStatusListFragment.java # mastodon/src/main/java/org/joinmastodon/android/fragments/FeaturedHashtagsListFragment.java # mastodon/src/main/java/org/joinmastodon/android/fragments/HashtagTimelineFragment.java # mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFeaturedFragment.java # mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java # mastodon/src/main/java/org/joinmastodon/android/fragments/ThreadFragment.java # mastodon/src/main/java/org/joinmastodon/android/fragments/discover/SearchFragment.java # mastodon/src/main/java/org/joinmastodon/android/fragments/discover/SearchQueryFragment.java # mastodon/src/main/java/org/joinmastodon/android/fragments/discover/TrendingHashtagsFragment.java # mastodon/src/main/java/org/joinmastodon/android/fragments/settings/SettingsMainFragment.java # mastodon/src/main/java/org/joinmastodon/android/model/Status.java # mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/HeaderStatusDisplayItem.java # mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/TextStatusDisplayItem.java # mastodon/src/main/java/org/joinmastodon/android/ui/text/HtmlParser.java # mastodon/src/main/java/org/joinmastodon/android/ui/text/LinkSpan.java # mastodon/src/main/java/org/joinmastodon/android/ui/utils/UiUtils.java # mastodon/src/main/java/org/joinmastodon/android/ui/viewcontrollers/ComposePollViewController.java # mastodon/src/main/res/layout/display_item_text.xml # mastodon/src/main/res/menu/post.xml # mastodon/src/main/res/values/styles.xml
- Loading branch information
Showing
7 changed files
with
140 additions
and
1 deletion.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
mastodon/src/main/java/org/joinmastodon/android/api/requests/tags/GetTag.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package org.joinmastodon.android.api.requests.tags; | ||
|
||
import org.joinmastodon.android.api.MastodonAPIRequest; | ||
import org.joinmastodon.android.model.Hashtag; | ||
|
||
public class GetTag extends MastodonAPIRequest<Hashtag>{ | ||
public GetTag(String tag){ | ||
super(HttpMethod.GET, "/tags/"+tag, Hashtag.class); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
mastodon/src/main/java/org/joinmastodon/android/api/requests/tags/SetTagFollowed.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package org.joinmastodon.android.api.requests.tags; | ||
|
||
import org.joinmastodon.android.api.MastodonAPIRequest; | ||
import org.joinmastodon.android.model.Hashtag; | ||
|
||
public class SetTagFollowed extends MastodonAPIRequest<Hashtag>{ | ||
public SetTagFollowed(String tag, boolean followed){ | ||
super(HttpMethod.POST, "/tags/"+tag+(followed ? "/follow" : "/unfollow"), Hashtag.class); | ||
setRequestBody(new Object()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
mastodon/src/main/java/org/joinmastodon/android/model/Translation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package org.joinmastodon.android.model; | ||
|
||
import org.joinmastodon.android.api.AllFieldsAreRequired; | ||
|
||
@AllFieldsAreRequired | ||
public class Translation extends BaseModel{ | ||
public String content; | ||
public String detectedSourceLanguage; | ||
public String provider; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<FrameLayout | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"> | ||
|
||
<ProgressBar | ||
android:id="@+id/translation_progress" | ||
android:layout_width="24dp" | ||
android:layout_height="24dp" | ||
android:layout_gravity="center" | ||
style="?android:progressBarStyleSmall"/> | ||
|
||
<LinearLayout | ||
android:orientation="horizontal" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:paddingHorizontal="16dp" | ||
android:paddingVertical="8dp" | ||
android:clipToPadding="false" | ||
android:baselineAligned="false" | ||
android:gravity="center_vertical"> | ||
|
||
<TextView | ||
android:id="@+id/translation_info_text" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_weight="1" | ||
android:textAppearance="@style/m3_body_small" | ||
android:textColor="?colorM3Secondary" | ||
tools:text="Translated from Japanese using DeepL.com"/> | ||
|
||
<Button | ||
android:id="@+id/translation_show_original" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="16dp" | ||
style="@style/Widget.Mastodon.M3.Button.Text" | ||
android:paddingHorizontal="8dp" | ||
android:layout_marginEnd="-8dp" | ||
android:text="@string/translation_show_original"/> | ||
</LinearLayout> | ||
</FrameLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:paddingHorizontal="16dp" | ||
android:paddingBottom="8dp"> | ||
|
||
<TextView | ||
android:id="@+id/title" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_toStartOf="@id/follow_btn_wrap" | ||
android:layout_marginEnd="8dp" | ||
android:textAppearance="@style/m3_headline_small" | ||
android:textColor="?colorM3OnSurface" | ||
android:maxLines="4" | ||
android:ellipsize="end" | ||
android:minHeight="36dp" | ||
android:gravity="center_vertical" | ||
tools:text="#CatsOfMastodonButLong"/> | ||
|
||
<FrameLayout | ||
android:id="@+id/follow_btn_wrap" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_alignTop="@id/title" | ||
android:layout_alignBottom="@id/title" | ||
android:layout_alignParentEnd="true"> | ||
|
||
<org.joinmastodon.android.ui.views.ProgressBarButton | ||
android:id="@+id/profile_action_btn" | ||
android:layout_width="wrap_content" | ||
android:layout_height="36dp" | ||
android:layout_gravity="center" | ||
style="@style/Widget.Mastodon.M3.Button.Filled" | ||
android:paddingHorizontal="16dp" | ||
tools:text="@string/button_follow" /> | ||
|
||
<ProgressBar | ||
android:id="@+id/action_progress" | ||
style="?android:progressBarStyleSmall" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center" | ||
android:elevation="10dp" | ||
android:indeterminate="true" | ||
android:outlineProvider="none" | ||
android:visibility="gone" /> | ||
</FrameLayout> | ||
|
||
<TextView | ||
android:id="@+id/subtitle" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_below="@id/title" | ||
android:layout_marginTop="8dp" | ||
android:textAppearance="@style/m3_label_large" | ||
android:textColor="?colorM3OnSurfaceVariant" | ||
tools:text="123 posts"/> | ||
|
||
</RelativeLayout> |