Skip to content

Commit

Permalink
Merge remote-tracking branch 'megalodon_main/main'
Browse files Browse the repository at this point in the history
# Conflicts:
#	mastodon/src/main/java/org/joinmastodon/android/PushNotificationReceiver.java
#	mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java
#	mastodon/src/main/res/layout/display_item_poll_option.xml
#	mastodon/src/main/res/menu/profile_own.xml
#	mastodon/src/main/res/values-pt-rBR/strings_sk.xml
#	mastodon/src/main/res/values/strings_sk.xml
  • Loading branch information
LucasGGamerM committed Sep 30, 2023
2 parents 3fceeec + cbee0fe commit d0c5a2e
Show file tree
Hide file tree
Showing 9 changed files with 85 additions and 41 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package org.joinmastodon.android.fragments.account_list;

import android.net.Uri;
import android.os.Bundle;

import org.joinmastodon.android.R;
import org.joinmastodon.android.api.requests.HeaderPaginationRequest;
import org.joinmastodon.android.api.requests.accounts.GetAccountBlocks;
import org.joinmastodon.android.model.Account;
import org.joinmastodon.android.ui.viewholders.AccountViewHolder;

public class BlockedAccountsListFragment extends AccountRelatedAccountListFragment{

@Override
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setTitle(R.string.sk_blocked_accounts);
}

@Override
public HeaderPaginationRequest<Account> onCreateRequest(String maxID, int count){
return new GetAccountBlocks(maxID, count);
}

@Override
protected void onConfigureViewHolder(AccountViewHolder holder){
super.onConfigureViewHolder(holder);
holder.setStyle(AccountViewHolder.AccessoryType.NONE, false);
}

@Override
public Uri getWebUri(Uri.Builder base) {
return super.getWebUri(base).buildUpon()
.appendPath("/blocks").build();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package org.joinmastodon.android.fragments.account_list;

import android.net.Uri;
import android.os.Bundle;

import org.joinmastodon.android.R;
import org.joinmastodon.android.api.requests.HeaderPaginationRequest;
import org.joinmastodon.android.api.requests.accounts.GetAccountMutes;
import org.joinmastodon.android.model.Account;
import org.joinmastodon.android.ui.viewholders.AccountViewHolder;

public class MutedAccountsListFragment extends AccountRelatedAccountListFragment{

@Override
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setTitle(R.string.sk_muted_accounts);
}

@Override
public HeaderPaginationRequest<Account> onCreateRequest(String maxID, int count){
return new GetAccountMutes(maxID, count);
}

@Override
protected void onConfigureViewHolder(AccountViewHolder holder){
super.onConfigureViewHolder(holder);
holder.setStyle(AccountViewHolder.AccessoryType.NONE, false);
}

@Override
public Uri getWebUri(Uri.Builder base) {
return super.getWebUri(base).buildUpon()
.appendPath("/mutes").build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public Holder(Activity activity, ViewGroup parent){
progressBg=activity.getResources().getDrawable(R.drawable.bg_poll_option_voted, activity.getTheme()).mutate();
progressBgInset=activity.getResources().getDrawable(R.drawable.bg_poll_option_voted_inset, activity.getTheme()).mutate();
itemView.setOnClickListener(this::onButtonClick);
button.setOutlineProvider(OutlineProviders.M3_BUTTON);
button.setOutlineProvider(OutlineProviders.roundedRect(20));
button.setClipToOutline(true);
}

Expand Down
4 changes: 2 additions & 2 deletions mastodon/src/main/res/drawable/bg_poll_option_clickable.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="?android:colorControlHighlight">
<item android:gravity="center_vertical" android:height="40dp">
<item>
<shape>
<stroke android:width="1dp" android:color="?colorM3Outline"/>
<corners android:radius="20dp"/>
</shape>
</item>
<item android:id="@android:id/mask" android:gravity="center_vertical" android:height="40dp">
<item android:id="@android:id/mask">
<shape>
<solid android:color="#000"/>
<corners android:radius="20dp"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="?android:colorControlHighlight">
<item android:gravity="center_vertical" android:height="40dp">
<item>
<shape>
<stroke android:width="1dp" android:color="?colorM3Outline"/>
<solid android:color="?colorM3Surface"/>
<corners android:radius="20dp"/>
</shape>
</item>
<item android:id="@android:id/mask" android:gravity="center_vertical" android:height="40dp">
<item android:id="@android:id/mask">
<shape>
<solid android:color="#000"/>
<corners android:radius="20dp"/>
Expand Down
4 changes: 2 additions & 2 deletions mastodon/src/main/res/drawable/bg_poll_option_voted.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:gravity="center_vertical" android:height="40dp">
<item>
<scale android:scaleGravity="start|fill_vertical" android:scaleWidth="100%">
<shape>
<solid android:color="?colorM3SecondaryContainer"/>
<corners android:radius="20dp"/>
</shape>
</scale>
</item>
<item android:gravity="center_vertical" android:height="40dp">
<item>
<shape>
<stroke android:width="1dp" android:color="?colorM3OutlineVariant"/>
<corners android:radius="20dp"/>
Expand Down
6 changes: 3 additions & 3 deletions mastodon/src/main/res/drawable/bg_poll_option_voted_inset.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:gravity="center_vertical" android:height="40dp">
<item>
<shape>
<solid android:color="?colorM3Surface"/>
<corners android:radius="20dp"/>
</shape>
</item>
<item android:gravity="center_vertical" android:height="40dp">
<item>
<scale android:scaleGravity="start|fill_vertical" android:scaleWidth="100%">
<shape>
<solid android:color="@color/poll_option_progress_inset"/>
<corners android:radius="20dp"/>
</shape>
</scale>
</item>
<item android:gravity="center_vertical" android:height="40dp">
<item>
<shape>
<stroke android:width="1dp" android:color="?colorM3Outline"/>
<corners android:radius="20dp"/>
Expand Down
28 changes: 1 addition & 27 deletions mastodon/src/main/res/values-pt-rBR/strings_sk.xml
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@
</plurals>
<string name="sk_mute_label">Duração</string>
<string name="sk_button_react">Reaja com emoji</string>
<string name="sk_enter_emoji_toast">Por favor, digite um emoji</string>
<string name="sk_enter_emoji_toast">Você precisa digitar um emoji</string>
<string name="sk_enter_emoji_hint">Digite para reagir com um emoji</string>
<string name="sk_again_for_system_keyboard">Toque novamente para Teclado do Sistema</string>
<string name="sk_duration_minutes_5">5 minutos</string>
Expand Down Expand Up @@ -370,31 +370,5 @@
<string name="sk_settings_auto_reveal_equal_spoilers">Revelar automaticamente Avisos de Conteúdo nas respostas</string>
<string name="sk_icon_recycle_bin">Lixeira de reciclagem</string>
<string name="sk_tab_search">Pesquisar</string>
<string name="sk_time_minutes">%d minutos</string>
<string name="sk_time_hours">%d horas</string>
<string name="sk_suicide_search_terms">Suicídio</string>
<string name="sk_time_seconds">%d segundos</string>
<string name="sk_time_days">%d dias</string>
<string name="sk_settings_show_emoji_reactions_only_opened">Somente quando a publicação for aberta</string>
<string name="sk_settings_show_emoji_reactions_hide_empty">Ocultar reações de emoji vazias</string>
<string name="sk_settings_show_emoji_reactions">Mostrar reações com emojis nas linhas do tempo</string>
<string name="sk_settings_show_emoji_reactions_always">Sempre mostrar o botão adicionar</string>
<string name="sk_search_suicide_title">Caso você precise de ajuda…</string>
<string name="sk_disable_pill_shaped_active_indicator">Desativar indicador de guia ativa em forma de comprimido</string>
<string name="sk_tab_home">Início</string>
<string name="sk_settings_show_labels_in_navigation_bar">Mostrar nomes das guias na barra de navegação</string>
<string name="sk_load_missing_posts_below">Carregar publicações mais antigas</string>
<string name="sk_do_not_show_again">Não mostrar novamente</string>
<string name="sk_search_suicide_hotlines">Encontre uma linha de apoio</string>
<string name="sk_trending_links_info_banner">Estas são as notícias mais comentadas em seu servidor.</string>
<string name="sk_post_contains_media">A publicação contém mídia</string>
<string name="sk_load_missing_posts_above">Carregar publicações mais recentes</string>
<string name="sk_search_suicide_message">Se você está procurando um sinal para não se matar, aqui está. Por favor, caso esteja deprimido e/ou tendo pensamentos suicidas, considere entrar em contato com uma linha de apoio para prevenção do suicídio.</string>
<string name="sk_suicide_helplines_url">https://findahelpline.com/br</string>
<string name="sk_trending_posts_info_banner">Essas são as publicações que estão ganhando força no seu servidor.</string>
<plurals name="sk_posts_count_label">
<item quantity="one">publicação</item>
<item quantity="many">publicações</item>
<item quantity="other">publicações</item>
</plurals>
</resources>
6 changes: 2 additions & 4 deletions mastodon/src/main/res/values/strings_sk.xml
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,6 @@
<item quantity="one">%d day</item>
<item quantity="other">%d days</item>
</plurals>
<string name="sk_muted_account">Muted accounts</string>
<string name="sk_mutes">Mutes</string>
<string name="sk_blocked_account">Blocked accounts</string>
<string name="sk_blocks">Blocks</string>
<string name="sk_muted_accounts">Muted accounts</string>
<string name="sk_blocked_accounts">Blocked accounts</string>
</resources>

0 comments on commit d0c5a2e

Please sign in to comment.