Merge remote-tracking branch 'megalodon_main/main'

# Conflicts:
#	mastodon/build.gradle
This commit is contained in:
LucasGGamerM
2023-10-21 09:32:19 -03:00
63 changed files with 298 additions and 157 deletions

View File

@@ -121,7 +121,7 @@ public class CacheController{
db.insertWithOnConflict("home_timeline", null, values, SQLiteDatabase.CONFLICT_REPLACE);
}
if(!clear)
db.delete("home_timeline", "`id` NOT IN (SELECT `id` FROM `home_timeline` ORDER BY `time` DESC LIMIT ?)", new String[]{"1000"});
db.delete("home_timeline", "`id` NOT IN (SELECT `id` FROM `home_timeline` ORDER BY `time` DESC LIMIT ?)", new String[]{"100"});
});
}

View File

@@ -53,9 +53,7 @@ public class MastodonAPIController{
.registerTypeAdapter(Status.class, new Status.StatusDeserializer())
.create();
private static WorkerThread thread=new WorkerThread("MastodonAPIController");
private static OkHttpClient httpClient=new OkHttpClient.Builder()
.readTimeout(5, TimeUnit.MINUTES)
.build();
private static OkHttpClient httpClient=new OkHttpClient.Builder().build();
private AccountSession session;
private static List<String> badDomains = new ArrayList<>();
@@ -113,13 +111,13 @@ public class MastodonAPIController{
}
Request hreq=builder.build();
Call call=httpClient.newCall(hreq);
OkHttpClient client=req.timeout>0
? httpClient.newBuilder().readTimeout(req.timeout, TimeUnit.MILLISECONDS).build()
: httpClient;
Call call=client.newCall(hreq);
synchronized(req){
req.okhttpCall=call;
}
if(req.timeout>0){
call.timeout().timeout(req.timeout, TimeUnit.MILLISECONDS);
}
if(BuildConfig.DEBUG)
Log.d(TAG, "["+(session==null ? "no-auth" : session.getID())+"] Sending request: "+hreq);

View File

@@ -153,8 +153,9 @@ public abstract class MastodonAPIRequest<T> extends APIRequest<T>{
headers.put(key, value);
}
protected void setTimeout(long timeout){
public MastodonAPIRequest<T> setTimeout(long timeout){
this.timeout=timeout;
return this;
}
protected String getPathPrefix(){

View File

@@ -237,21 +237,25 @@ public class HomeTabFragment extends MastodonToolbarFragment implements Scrollab
ViewTreeObserver vto = getToolbar().getViewTreeObserver();
if (vto.isAlive()) {
vto.addOnGlobalLayoutListener(() -> {
Toolbar t = getToolbar();
if (t == null) return;
int toolbarWidth = t.getWidth();
if (toolbarWidth == 0) return;
vto.addOnGlobalLayoutListener(()->{
Toolbar t=getToolbar();
if(t==null) return;
int toolbarWidth=t.getWidth();
if(toolbarWidth==0) return;
int toolbarFrameWidth = toolbarFrame.getWidth();
int padding = toolbarWidth - toolbarFrameWidth;
FrameLayout parent = ((FrameLayout) toolbarShowNewPostsBtn.getParent());
if (padding == parent.getPaddingStart()) return;
int toolbarFrameWidth=toolbarFrame.getWidth();
int actionsWidth=toolbarWidth-toolbarFrameWidth;
// margin (4) + padding (12) + icon (24) + margin (8) + chevron (16) + padding (12)
int switcherWidth=V.dp(76);
FrameLayout parent=((FrameLayout) toolbarShowNewPostsBtn.getParent());
if(actionsWidth==parent.getPaddingStart()) return;
int paddingMax=Math.max(actionsWidth, switcherWidth);
int paddingEnd=(Math.max(0, switcherWidth-actionsWidth));
// toolbar frame goes from screen edge to beginning of right-aligned option buttons.
// centering button by applying the same space on the left
parent.setPaddingRelative(padding, 0, 0, 0);
toolbarShowNewPostsBtn.setMaxWidth(toolbarWidth - padding * 2);
parent.setPaddingRelative(paddingMax, 0, paddingEnd, 0);
toolbarShowNewPostsBtn.setMaxWidth(toolbarWidth-paddingMax*2);
switcher.setPivotX(V.dp(28)); // padding + half of icon
switcher.setPivotY(switcher.getHeight() / 2f);

View File

@@ -136,6 +136,7 @@ public class HomeTimelineFragment extends StatusListFragment {
public void onSuccess(List<Status> result){
currentRequest=null;
dataLoading=false;
refreshDone();
if(result.isEmpty() || getActivity()==null)
return;
Status last=result.get(result.size()-1);
@@ -157,7 +158,6 @@ public class HomeTimelineFragment extends StatusListFragment {
prependItems(toAdd, true);
if(parent != null && GlobalUserPreferences.showNewPostsButton) parent.showNewPostsButton();
}
refreshDone();
}
@Override

View File

@@ -9,6 +9,7 @@ import com.squareup.otto.Subscribe;
import org.joinmastodon.android.E;
import org.joinmastodon.android.GlobalUserPreferences;
import org.joinmastodon.android.api.CacheController;
import org.joinmastodon.android.api.session.AccountLocalPreferences;
import org.joinmastodon.android.api.session.AccountSessionManager;
import org.joinmastodon.android.events.StatusMuteChangedEvent;
@@ -34,6 +35,10 @@ import org.parceler.Parcels;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.function.BiPredicate;
import java.util.function.Consumer;
import java.util.function.Predicate;
import java.util.function.Supplier;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@@ -193,56 +198,71 @@ public abstract class StatusListFragment extends BaseStatusListFragment<Status>
}
}
private void iterateRemoveStatus(List<Status> l, String id){
Iterator<Status> it=l.iterator();
while(it.hasNext()){
if(it.next().getContentStatus().id.equals(id)){
it.remove();
}
}
}
private void removeStatusDisplayItems(Status status, int index, int ancestorFirstIndex, int ancestorLastIndex, boolean deleteContent){
private boolean removeStatusDisplayItems(String parentID, int firstIndex, int ancestorFirstIndex, int ancestorLastIndex){
// did we find an ancestor that is also the status' neighbor?
if(ancestorFirstIndex>=0 && ancestorLastIndex==index-1){
for(int i=ancestorFirstIndex; i<=ancestorLastIndex; i++){
StatusDisplayItem item=displayItems.get(i);
String id=deleteContent ? item.getContentID() : item.parentID;
// update ancestor to have no descendant anymore
if(id.equals(status.inReplyToId)) item.hasDescendantNeighbor=false;
}
if(ancestorFirstIndex>=0 && ancestorLastIndex==firstIndex-1){
// update ancestor to have no descendant anymore
displayItems.subList(ancestorFirstIndex, ancestorLastIndex+1).forEach(i->i.hasDescendantNeighbor=false);
adapter.notifyItemRangeChanged(ancestorFirstIndex, ancestorLastIndex-ancestorFirstIndex+1);
}
if(index==-1) return;
int lastIndex;
for(lastIndex=index;lastIndex<displayItems.size();lastIndex++){
StatusDisplayItem item=displayItems.get(lastIndex);
String id=deleteContent ? item.getContentID() : item.parentID;
if(!id.equals(status.id)) break;
if(firstIndex==-1) return false;
int lastIndex=firstIndex;
while(lastIndex<displayItems.size()){
if(!displayItems.get(lastIndex).parentID.equals(parentID)) break;
lastIndex++;
}
displayItems.subList(index, lastIndex).clear();
adapter.notifyItemRangeRemoved(index, lastIndex-index);
int count=lastIndex-firstIndex;
displayItems.subList(firstIndex, lastIndex).clear();
adapter.notifyItemRangeRemoved(firstIndex, count);
return true;
}
protected void removeStatus(Status status){
boolean deleteContent=status==status.getContentStatus();
final AccountSessionManager asm=AccountSessionManager.getInstance();
final CacheController cache=AccountSessionManager.get(accountID).getCacheController();
final boolean unReblogging=status.reblog!=null && asm.isSelf(accountID, status.account);
final Predicate<Status> isToBeRemovedReblog=item->item!=null && item.reblog!=null
&& item.reblog.id.equals(status.reblog.id)
&& asm.isSelf(accountID, item.account);
final BiPredicate<String, Supplier<String>> isToBeRemovedContent=(parentId, contentIdSupplier)->
parentId.equals(status.id) || contentIdSupplier.get().equals(status.id);
int ancestorFirstIndex=-1, ancestorLastIndex=-1;
for(int i=0;i<displayItems.size();i++){
StatusDisplayItem item=displayItems.get(i);
String id=deleteContent ? item.getContentID() : item.parentID;
if(id.equals(status.id)){
removeStatusDisplayItems(status, i, ancestorFirstIndex, ancestorLastIndex, deleteContent);
ancestorFirstIndex=ancestorLastIndex=-1;
continue;
}
if(id.equals(status.inReplyToId)){
// we found a status that the to-be-removed status replies to!
// storing indices to maybe update its display items
if(item.parentID.equals(status.inReplyToId)){
if(ancestorFirstIndex==-1) ancestorFirstIndex=i;
ancestorLastIndex=i;
}
// if we're un-reblogging, we compare the reblogged status's id with the current status's
if(unReblogging
? isToBeRemovedReblog.test(getStatusByID(item.parentID))
: isToBeRemovedContent.test(item.parentID, item::getContentStatusID)){
// if statuses are removed from index i, the next iteration should be on the same index again
if(removeStatusDisplayItems(item.parentID, i, ancestorFirstIndex, ancestorLastIndex)) i--;
// resetting in case we find another occurrence of the same status that also has ancestors
// (we won't - unless the timeline is being especially weird)
ancestorFirstIndex=-1; ancestorLastIndex=-1;
}
}
iterateRemoveStatus(data, status.id);
iterateRemoveStatus(preloadedData, status.id);
Consumer<List<Status>> removeStatusFromData=(list)->{
Iterator<Status> it=list.iterator();
while(it.hasNext()){
Status s=it.next();
if(unReblogging
? isToBeRemovedReblog.test(s)
: isToBeRemovedContent.test(s.id, s::getContentStatusID)){
it.remove();
cache.deleteStatus(s.id);
}
}
};
removeStatusFromData.accept(data);
removeStatusFromData.accept(preloadedData);
}
@Override
@@ -335,10 +355,14 @@ public abstract class StatusListFragment extends BaseStatusListFragment<Status>
@Subscribe
public void onReblogDeleted(ReblogDeletedEvent ev){
AccountSessionManager asm=AccountSessionManager.getInstance();
if(!ev.accountID.equals(accountID))
return;
for(Status item : data){
if(item.getContentStatus().id.equals(ev.statusID) && item.reblog!=null){
boolean itemIsOwnReblog=item.reblog!=null
&& item.getContentStatusID().equals(ev.statusID)
&& asm.isSelf(accountID, item.account);
if(itemIsOwnReblog){
removeStatus(item);
break;
}

View File

@@ -36,6 +36,7 @@ import java.util.stream.Collectors;
import me.grishka.appkit.Nav;
import me.grishka.appkit.api.Callback;
import me.grishka.appkit.api.ErrorResponse;
import me.grishka.appkit.api.SimpleCallback;
import me.grishka.appkit.utils.V;
public class SearchFragment extends BaseStatusListFragment<SearchResult>{
@@ -142,7 +143,7 @@ public class SearchFragment extends BaseStatusListFragment<SearchResult>{
}*/
int offset=_offset;
currentRequest=new GetSearchResults(currentQuery, type, type==null, maxID, offset, type==null ? 0 : count)
.setCallback(new Callback<>(){
.setCallback(new SimpleCallback<>(this){
@Override
public void onSuccess(SearchResults result){
ArrayList<SearchResult> results=new ArrayList<>();
@@ -165,16 +166,8 @@ public class SearchFragment extends BaseStatusListFragment<SearchResult>{
unfilteredResults=results;
onDataLoaded(filterSearchResults(results), type!=null && !results.isEmpty());
}
@Override
public void onError(ErrorResponse error){
currentRequest=null;
Activity a=getActivity();
if(a==null)
return;
error.showToast(a);
}
})
.setTimeout(180000) // 3 minutes (searches can take a long time)
.exec(accountID);
}

View File

@@ -34,7 +34,6 @@ import me.grishka.appkit.api.Callback;
import me.grishka.appkit.api.ErrorResponse;
import me.grishka.appkit.imageloader.ViewImageLoader;
import me.grishka.appkit.imageloader.requests.UrlImageLoaderRequest;
import me.grishka.appkit.utils.CubicBezierInterpolator;
import me.grishka.appkit.utils.V;
public class ReportDoneFragment extends MastodonToolbarFragment{

View File

@@ -242,7 +242,7 @@ public class SettingsDisplayFragment extends BaseSettingsFragment<Void>{
AlertDialog.Builder alert=new M3AlertDialogBuilder(getActivity())
.setTitle(R.string.sk_settings_color_palette)
.setSingleChoiceItems(items.toArray(String[]::new),
.setSingleChoiceItems(items.stream().toArray(String[]::new),
selected, (dlg, item)->newSelected[0]=item)
.setPositiveButton(R.string.ok, (dlg, item)->save.accept(false))
.setNegativeButton(R.string.cancel, null);

View File

@@ -204,6 +204,10 @@ public class Status extends BaseModel implements DisplayItemsParent, Searchable{
return reblog!=null ? reblog : this;
}
public String getContentStatusID(){
return getContentStatus().id;
}
public String getStrippedText(){
if(strippedText==null)
strippedText=HtmlParser.strip(content);

View File

@@ -92,7 +92,7 @@ public abstract class StatusDisplayItem{
}
@NonNull
public String getContentID(){
public String getContentStatusID(){
if(parentFragment instanceof StatusListFragment slf){
Status s=slf.getContentStatusByID(parentID);
return s!=null ? s.id : parentID;

View File

@@ -647,11 +647,8 @@ public class UiUtils {
@Override
public void onSuccess(Status result) {
resultCallback.accept(result);
CacheController cache=AccountSessionManager.get(accountID).getCacheController();
cache.deleteStatus(s.id);
E.post(new StatusDeletedEvent(s.id, accountID));
if(status!=s){
cache.deleteStatus(status.id);
E.post(new StatusDeletedEvent(status.id, accountID));
}
}

View File

@@ -3,19 +3,13 @@
android:color="@color/m3_primary_overlay">
<item android:gravity="center_vertical" android:height="40dp">
<selector>
<item android:state_enabled="true" android:state_selected="true">
<item android:state_enabled="true">
<shape>
<solid android:color="?colorM3SecondaryContainer"/>
<corners android:radius="20dp"/>
</shape>
</item>
<item android:state_selected="false">
<shape>
<stroke android:color="@color/m3_on_surface_overlay" android:width="1dp"/>
<corners android:radius="20dp"/>
</shape>
</item>
<item android:state_enabled="false">
<item>
<shape>
<solid android:color="?colorM3DisabledBackground"/>
<corners android:radius="20dp"/>

View File

@@ -3,19 +3,13 @@
android:color="@color/m3_primary_overlay">
<item android:gravity="center" android:height="40dp" android:width="40dp">
<selector>
<item android:state_enabled="true" android:state_selected="true">
<item android:state_enabled="true">
<shape>
<solid android:color="?colorM3SecondaryContainer"/>
<corners android:radius="20dp"/>
</shape>
</item>
<item android:state_selected="false">
<shape>
<stroke android:color="@color/m3_on_surface_overlay" android:width="1dp"/>
<corners android:radius="20dp"/>
</shape>
</item>
<item android:state_enabled="false">
<item>
<shape>
<solid android:color="?colorM3DisabledBackground"/>
<corners android:radius="20dp"/>

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/m3_primary_overlay">
<item android:gravity="center" android:height="40dp" android:width="40dp">
<selector>
<item android:state_enabled="true" android:state_selected="true">
<shape>
<solid android:color="?colorM3SecondaryContainer"/>
<corners android:radius="20dp"/>
</shape>
</item>
<item android:state_selected="false">
<shape>
<stroke android:color="@color/m3_on_surface_overlay" android:width="1dp"/>
<corners android:radius="20dp"/>
</shape>
</item>
<item android:state_enabled="false">
<shape>
<solid android:color="?colorM3DisabledBackground"/>
<corners android:radius="20dp"/>
</shape>
</item>
</selector>
</item>
<item android:id="@android:id/mask" android:gravity="center" android:height="40dp" android:width="40dp">
<shape>
<solid android:color="#000"/>
<corners android:radius="20dp"/>
</shape>
</item>
</ripple>

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/m3_primary_overlay">
<item android:gravity="center_vertical" android:height="40dp">
<selector>
<item android:state_enabled="true" android:state_selected="true">
<shape>
<solid android:color="?colorM3SecondaryContainer"/>
<corners android:radius="20dp"/>
</shape>
</item>
<item android:state_selected="false">
<shape>
<stroke android:color="@color/m3_on_surface_overlay" android:width="1dp"/>
<corners android:radius="20dp"/>
</shape>
</item>
<item android:state_enabled="false">
<shape>
<solid android:color="?colorM3DisabledBackground"/>
<corners android:radius="20dp"/>
</shape>
</item>
</selector>
</item>
<item android:id="@android:id/mask" android:gravity="center_vertical" android:height="40dp">
<shape>
<solid android:color="#000"/>
<corners android:radius="20dp"/>
</shape>
</item>
</ripple>

View File

@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="@color/highlight_over_dark">
<item>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/m3_pressed_overlay">
<item android:gravity="center_vertical" android:height="36dp">
<shape>
<solid android:color="?colorPrimary800"/>
<corners android:radius="16sp"/>
<padding android:left="16sp" android:right="16sp"/>
<solid android:color="?colorM3Primary"/>
<corners android:radius="18dp"/>
</shape>
</item>
</ripple>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/m3_pressed_overlay">
<item android:gravity="center_vertical" android:height="36dp">
<shape>
<stroke android:color="@color/m3_on_surface_overlay" android:width="1dp"/>
<corners android:radius="18dp"/>
</shape>
</item>
</ripple>

View File

@@ -30,7 +30,7 @@
android:layout_height="wrap_content"
android:minHeight="48dp"
android:minWidth="48dp"
android:background="@drawable/bg_button_m3_tonal_circle"
android:background="@drawable/bg_button_m3_tonal_circle_selector"
android:tooltipText="@string/sk_button_react"
android:contentDescription="@string/sk_button_react"
android:src="@drawable/ic_fluent_add_24_filled" />

View File

@@ -49,7 +49,7 @@
<Button
android:id="@+id/advanced"
style="@style/Widget.Mastodon.M3.Button.Outlined"
android:background="@drawable/bg_button_m3_tonal"
android:background="@drawable/bg_button_m3_tonal_selector"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="24dp"

View File

@@ -366,6 +366,7 @@
<Button
style="@style/Widget.Mastodon.M3.Button.Tonal.Icon"
android:background="@drawable/bg_button_m3_tonal_selector"
android:id="@+id/sensitive_item"
android:orientation="horizontal"
android:layout_width="wrap_content"

View File

@@ -93,7 +93,7 @@
android:layout_width="48dp"
android:layout_height="48dp"
style="@style/Widget.Mastodon.M3.Button.Tonal"
android:background="@drawable/bg_button_m3_tonal_circle"
android:background="@drawable/bg_button_m3_tonal_circle_selector"
android:paddingStart="12dp"
android:drawableStart="@drawable/ic_fluent_alert_24_selector" />

View File

@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/switcher_btn"
style="@style/Widget.Mastodon.M3.Button.Text"
android:orientation="horizontal"
android:id="@+id/switcher_btn"
style="@style/Widget.Mastodon.M3.Button.Text"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center_vertical|start"
@@ -14,55 +14,44 @@
android:tooltipText="@string/sk_switch_timeline"
android:paddingStart="12dp"
android:paddingEnd="12dp">
<ImageView
android:id="@+id/timeline_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@drawable/ic_fluent_home_24_regular" />
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical">
<ImageView
android:id="@+id/collapsed_chevron"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_gravity="center_vertical"
android:src="@drawable/ic_fluent_chevron_down_16_filled"
android:visibility="gone" />
<TextView
android:id="@+id/timeline_title"
style="?android:attr/titleTextAppearance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:drawablePadding="8dp"
android:drawableEnd="@drawable/ic_fluent_chevron_down_16_filled" />
</FrameLayout>
</LinearLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:id="@+id/show_new_posts_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingVertical="2dp"
android:paddingStart="16dp"
android:paddingEnd="20dp"
android:minHeight="32sp"
android:maxLines="2"
android:ellipsize="end"
android:lineSpacingMultiplier="0.8"
android:textAppearance="@style/m3_title_medium"
android:textSize="16sp"
android:text="@string/see_new_posts"
android:textColor="@color/gray_25"
android:background="@drawable/bg_button_new_posts"
android:drawableStart="@drawable/ic_fluent_arrow_up_16_filled"
android:drawablePadding="8dp"
android:layout_gravity="center" />
</FrameLayout>
<ImageView
android:id="@+id/timeline_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@drawable/ic_fluent_home_24_regular"/>
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical">
<ImageView
android:id="@+id/collapsed_chevron"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_gravity="center_vertical"
android:src="@drawable/ic_fluent_chevron_down_16_filled"
android:visibility="gone"/>
<TextView
style="@style/action_bar_title"
android:id="@+id/timeline_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:drawablePadding="8dp"
android:drawableEnd="@drawable/ic_fluent_chevron_down_16_filled"/>
</FrameLayout>
</LinearLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
style="?toolbarActionButtonStyle"
android:id="@+id/show_new_posts_btn"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="@string/see_new_posts"
android:drawableStart="@drawable/ic_fluent_arrow_up_16_filled"
android:layout_gravity="center"/>
</FrameLayout>
</FrameLayout>

View File

@@ -23,5 +23,5 @@
android:layout_marginEnd="8dp"
android:drawableTint="@null"
android:drawableStart="@drawable/image_placeholder"
android:background="@drawable/bg_button_m3_tonal"/>
android:background="@drawable/bg_button_m3_tonal_selector"/>
</FrameLayout>

View File

@@ -714,4 +714,5 @@
<!-- Screen reader description for the menu on the home timeline screen -->
<!-- %s is the name of the list -->
<!-- %s is a username -->
<string name="see_new_posts">استعرض المنشورات الجديدة</string>
</resources>

View File

@@ -531,4 +531,5 @@
<!-- Screen reader description for the menu on the home timeline screen -->
<!-- %s is the name of the list -->
<!-- %s is a username -->
<string name="see_new_posts">Паказаць новыя допісы</string>
</resources>

View File

@@ -297,4 +297,5 @@
<!-- Screen reader description for the menu on the home timeline screen -->
<!-- %s is the name of the list -->
<!-- %s is a username -->
<string name="see_new_posts">Publicacions noves</string>
</resources>

View File

@@ -643,4 +643,5 @@
<!-- Screen reader description for the menu on the home timeline screen -->
<!-- %s is the name of the list -->
<!-- %s is a username -->
<string name="see_new_posts">Zobrazit nové příspěvky</string>
</resources>

View File

@@ -507,4 +507,5 @@
<!-- Screen reader description for the menu on the home timeline screen -->
<!-- %s is the name of the list -->
<!-- %s is a username -->
<string name="see_new_posts">Se nye indlæg</string>
</resources>

View File

@@ -586,4 +586,5 @@
<!-- Screen reader description for the menu on the home timeline screen -->
<!-- %s is the name of the list -->
<!-- %s is a username -->
<string name="see_new_posts">Neue Beiträge anzeigen</string>
</resources>

View File

@@ -615,4 +615,5 @@
<string name="delete_list_confirm">Διαγραφή “%s”;</string>
<string name="list_exclusive">Απόκρυψη μελών στο Ακολουθείς</string>
<!-- %s is a username -->
<string name="see_new_posts">Δες νέες αναρτήσεις</string>
</resources>

View File

@@ -445,4 +445,5 @@
<!-- Screen reader description for the menu on the home timeline screen -->
<!-- %s is the name of the list -->
<!-- %s is a username -->
<string name="see_new_posts">Ikusi bidalketa berriak</string>
</resources>

View File

@@ -602,4 +602,5 @@
<!-- Screen reader description for the menu on the home timeline screen -->
<!-- %s is the name of the list -->
<!-- %s is a username -->
<string name="see_new_posts">Uusia julkaisuja</string>
</resources>

View File

@@ -288,4 +288,5 @@
<!-- Screen reader description for the menu on the home timeline screen -->
<!-- %s is the name of the list -->
<!-- %s is a username -->
<string name="see_new_posts">Tingnan ang mga bagong post</string>
</resources>

View File

@@ -598,4 +598,5 @@
<!-- Screen reader description for the menu on the home timeline screen -->
<!-- %s is the name of the list -->
<!-- %s is a username -->
<string name="see_new_posts">Voir les nouveaux messages</string>
</resources>

View File

@@ -411,4 +411,7 @@
<string name="sk_edit_alt_text">Modifier le texte alternatif</string>
<string name="sk_message_cache_cleared">Cache des messages vidé</string>
<string name="sk_settings_clear_timeline_cache">Effacer le cache du fil d\'accueil</string>
<string name="sk_settings_default_visibility">Visibilité de publication par défaut</string>
<string name="sk_settings_lock_account">Approuver manuellement les nouveaux abonnés</string>
<string name="sk_timeline_cache_cleared">Cache du fil d\'accueil vidé</string>
</resources>

View File

@@ -644,4 +644,5 @@
<!-- Screen reader description for the menu on the home timeline screen -->
<!-- %s is the name of the list -->
<!-- %s is a username -->
<string name="see_new_posts">Seall na postaichean ùra</string>
</resources>

View File

@@ -376,4 +376,5 @@
<!-- Screen reader description for the menu on the home timeline screen -->
<!-- %s is the name of the list -->
<!-- %s is a username -->
<string name="see_new_posts">Új bejegyzések megtekintése</string>
</resources>

View File

@@ -388,4 +388,5 @@
<!-- Screen reader description for the menu on the home timeline screen -->
<!-- %s is the name of the list -->
<!-- %s is a username -->
<string name="see_new_posts">Նոր գրառումներ</string>
</resources>

View File

@@ -570,4 +570,5 @@
<!-- Screen reader description for the menu on the home timeline screen -->
<!-- %s is the name of the list -->
<!-- %s is a username -->
<string name="see_new_posts">Lihat kiriman baru</string>
</resources>

View File

@@ -402,4 +402,8 @@
<string name="sk_settings_color_palette_default">Bawaan (%s)</string>
<string name="sk_settings_underlined_links">Tautan yang digarisbawahi</string>
<string name="sk_edit_alt_text">Sunting teks alternatif</string>
<string name="sk_settings_default_visibility">Keterlihatan kiriman bawaan</string>
<string name="sk_settings_lock_account">Setujui pengikut baru secara manual</string>
<string name="sk_timeline_cache_cleared">Tembolok lini masa beranda dihapus</string>
<string name="sk_settings_clear_timeline_cache">Hapus tembolok lini masa beranda</string>
</resources>

View File

@@ -602,4 +602,5 @@
<!-- Screen reader description for the menu on the home timeline screen -->
<!-- %s is the name of the list -->
<!-- %s is a username -->
<string name="see_new_posts">Visualizza nuovi post</string>
</resources>

View File

@@ -602,4 +602,5 @@
<plurals name="x_posts_recently">
<item quantity="other">最近の投稿 %,d 件</item>
</plurals>
<string name="see_new_posts">新しい投稿を見る</string>
</resources>

View File

@@ -246,4 +246,5 @@
<!-- Screen reader description for the menu on the home timeline screen -->
<!-- %s is the name of the list -->
<!-- %s is a username -->
<string name="see_new_posts">Ẓer tissufaɣ timaynutin</string>
</resources>

View File

@@ -304,4 +304,5 @@
<!-- Screen reader description for the menu on the home timeline screen -->
<!-- %s is the name of the list -->
<!-- %s is a username -->
<string name="see_new_posts">새 게시물 보기</string>
</resources>

View File

@@ -598,4 +598,5 @@
<!-- Screen reader description for the menu on the home timeline screen -->
<!-- %s is the name of the list -->
<!-- %s is a username -->
<string name="see_new_posts">Nieuwe berichten</string>
</resources>

View File

@@ -461,4 +461,5 @@
<!-- Screen reader description for the menu on the home timeline screen -->
<!-- %s is the name of the list -->
<!-- %s is a username -->
<string name="see_new_posts">Zobacz nowe wpisy</string>
</resources>

View File

@@ -585,4 +585,5 @@
<!-- Screen reader description for the menu on the home timeline screen -->
<!-- %s is the name of the list -->
<!-- %s is a username -->
<string name="see_new_posts">Ver novas publicações</string>
</resources>

View File

@@ -238,4 +238,5 @@
<!-- Screen reader description for the menu on the home timeline screen -->
<!-- %s is the name of the list -->
<!-- %s is a username -->
<string name="see_new_posts">Ver novas publicações</string>
</resources>

View File

@@ -53,4 +53,5 @@
<!-- Screen reader description for the menu on the home timeline screen -->
<!-- %s is the name of the list -->
<!-- %s is a username -->
<string name="see_new_posts">Se nye innlegg</string>
</resources>

View File

@@ -405,4 +405,8 @@
<string name="sk_settings_color_palette_default">Implicit (%s)</string>
<string name="sk_settings_underlined_links">Link-uri subliniate</string>
<string name="sk_edit_alt_text">Editați text alternativ</string>
<string name="sk_settings_default_visibility">Vizibilitatea implicită a postărilor</string>
<string name="sk_settings_lock_account">Aprobați manual urmăritori noi</string>
<string name="sk_timeline_cache_cleared">Memoria cache a cronologiei acasă a fost ștearsă</string>
<string name="sk_settings_clear_timeline_cache">Ștergeți memoria cache a cronologiei acasă</string>
</resources>

View File

@@ -664,4 +664,5 @@
<!-- Screen reader description for the menu on the home timeline screen -->
<!-- %s is the name of the list -->
<!-- %s is a username -->
<string name="see_new_posts">Показать новые</string>
</resources>

View File

@@ -549,4 +549,5 @@
<!-- Screen reader description for the menu on the home timeline screen -->
<!-- %s is the name of the list -->
<!-- %s is a username -->
<string name="see_new_posts">Pokaži nove objave</string>
</resources>

View File

@@ -572,4 +572,5 @@
<!-- %s is a username -->
<string name="remove_from_list">Ta bort från lista</string>
<string name="confirm_remove_list_member">Ta bort medlem?</string>
<string name="see_new_posts">Se nya inlägg</string>
</resources>

View File

@@ -601,4 +601,5 @@
<!-- Screen reader description for the menu on the home timeline screen -->
<!-- %s is the name of the list -->
<!-- %s is a username -->
<string name="see_new_posts">Yeni gönderileri gör</string>
</resources>

View File

@@ -664,4 +664,5 @@
<!-- Screen reader description for the menu on the home timeline screen -->
<!-- %s is the name of the list -->
<!-- %s is a username -->
<string name="see_new_posts">Переглянути нові дописи</string>
</resources>

View File

@@ -144,7 +144,7 @@
<string name="sk_timeline_federated">Федерація</string>
<string name="sk_recent_searches_placeholder">Почніть вводити, щоб почати пошук</string>
<string name="sk_remove_follower">Вилучити як підписника</string>
<string name="sk_remove_follower_confirm">Вилучити %s як підписника заблокувавши й миттєво розблокувавши\?</string>
<string name="sk_remove_follower_confirm">Вилучити %s як підписника, заблокувавши й миттєво розблокувавши\?</string>
<string name="sk_do_remove_follower">Вилучити</string>
<string name="sk_remove_follower_success">Підписника успішно вилучено</string>
<string name="sk_changelog">Журнал змін</string>
@@ -281,7 +281,7 @@
<string name="sk_content_type_bbcode">BBCode</string>
<string name="sk_content_type_mfm">MFM</string>
<string name="sk_settings_content_types">Увімкнути форматування допису</string>
<string name="sk_settings_default_content_type">Типовий тип вмісту</string>
<string name="sk_settings_default_content_type">Усталений тип вмісту</string>
<string name="sk_content_type">Тип вмісту</string>
<string name="sk_settings_default_content_type_explanation">Це дозволяє вам попередньо вибрати тип вмісту під час написання нових дописів, замінивши значення, встановлене в «Налаштуваннях постингу».</string>
<string name="sk_content_type_markdown">Markdown</string>
@@ -412,4 +412,7 @@
<string name="sk_edit_alt_text">Змінити альтернативний текст</string>
<string name="sk_message_cache_cleared">Кеш повідомлень очищено</string>
<string name="sk_settings_clear_timeline_cache">Очистити кеш домашньої стрічки</string>
<string name="sk_settings_default_visibility">Усталена видимість дописів</string>
<string name="sk_settings_lock_account">Затверджувати нових підписників уручну</string>
<string name="sk_timeline_cache_cleared">Кеш домашньої стрічки очищено</string>
</resources>

View File

@@ -602,4 +602,5 @@
<plurals name="x_posts_recently">
<item quantity="other">%,d tút mới</item>
</plurals>
<string name="see_new_posts">Đọc những tút mới</string>
</resources>

View File

@@ -563,4 +563,5 @@
<!-- Screen reader description for the menu on the home timeline screen -->
<!-- %s is the name of the list -->
<!-- %s is a username -->
<string name="see_new_posts">查看新嘟文</string>
</resources>

View File

@@ -38,6 +38,7 @@
<attr name="colorM3DarkOnSurface" format="color" />
<attr name="colorTabBarAlpha" format="color" />
<attr name="colorFilledCardAlpha" format="color" />
<attr name="toolbarActionButtonStyle" format="reference" />
<attr name="colorPrimary25" format="color" />
<attr name="colorPrimary50" format="color" />

View File

@@ -85,6 +85,7 @@
<item name="colorM3OnErrorContainer">#410E0B</item>
<item name="colorWhite">#FFF</item>
<item name="colorSensitiveOverlay">#a6ffffff</item>
<item name="toolbarActionButtonStyle">@style/Widget.Mastodon.M3.Button.ToolbarAction</item>
<!--
custom themes generally don't have secondary/tertiary accent colors -
@@ -174,6 +175,7 @@
<item name="colorM3SecondaryContainer">?colorNeutral800</item>
<item name="colorTabBarAlpha">#00000000</item>
<item name="colorFilledCardAlpha">#00000000</item>
<item name="toolbarActionButtonStyle">@style/Widget.Mastodon.M3.Button.ToolbarAction.Black</item>
</style>
<style name="ColorPalette.Material3">

View File

@@ -267,7 +267,7 @@
<!-- %s is the server domain -->
<string name="local_timeline_info_banner">These are all the posts from all users in your server (%s).</string>
<string name="recommended_accounts_info_banner">You might like these accounts based on others you follow.</string>
<string name="see_new_posts">See new posts</string>
<string name="see_new_posts">New posts</string>
<string name="load_missing_posts">Load missing posts</string>
<string name="follow_back">Follow Back</string>
<string name="button_follow_pending">Pending</string>

View File

@@ -36,6 +36,7 @@
<item name="android:windowActionModeOverlay">true</item>
<item name="android:actionModeBackground">?colorM3PrimaryContainer</item>
<item name="android:actionModeCloseDrawable">@drawable/ic_fluent_dismiss_24_regular</item>
<item name="appkitBackDrawable">@drawable/ic_fluent_arrow_left_24_regular</item>
<!-- <item name="appkitEmptyTextAppearance">@style/empty_text</item>-->
<item name="android:statusBarColor">?colorM3Background</item>
@@ -75,6 +76,7 @@
<item name="android:windowActionModeOverlay">true</item>
<item name="android:actionModeBackground">?colorM3PrimaryContainer</item>
<item name="android:actionModeCloseDrawable">@drawable/ic_fluent_dismiss_24_regular</item>
<item name="appkitBackDrawable">@drawable/ic_fluent_arrow_left_24_regular</item>
<!-- <item name="appkitEmptyTextAppearance">@style/empty_text</item>-->
<item name="colorM3DisabledBackground">#1FE3E3E3</item>
@@ -245,6 +247,25 @@
<item name="android:paddingStart">16dp</item>
</style>
<style name="Widget.Mastodon.M3.Button.ToolbarAction">
<item name="android:paddingStart">14dp</item>
<item name="android:paddingEnd">20dp</item>
<item name="android:textAppearance">@style/m3_title_medium</item>
<item name="android:ellipsize">end</item>
<item name="android:maxLines">1</item>
<item name="android:textSize">16sp</item>
<item name="android:stateListAnimator">@animator/m3_button_elevation</item>
<item name="android:background">@drawable/bg_button_new_posts</item>
<item name="android:textColor">@color/button_text_m3_filled</item>
<item name="android:drawableTint">@color/button_text_m3_filled</item>
</style>
<style name="Widget.Mastodon.M3.Button.ToolbarAction.Black">
<item name="android:background">@drawable/bg_button_new_posts_outlined</item>
<item name="android:textColor">@color/button_text_m3_tonal</item>
<item name="android:drawableTint">@color/button_text_m3_tonal</item>
</style>
<style name="Widget.Mastodon.M3.EditText" parent="android:Widget.Material.EditText">
<item name="android:background">@drawable/bg_m3_outlined_text_field_nopad</item>
<item name="android:textAppearance">@style/m3_body_large</item>