Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo #42

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.wmods.wppenhacer.adapter;

import static com.wmods.wppenhacer.xposed.features.customization.IGStatus.itens;
import static com.wmods.wppenhacer.xposed.features.customization.IGStatus.items;

import android.content.Context;
import android.content.Intent;
Expand Down Expand Up @@ -91,13 +91,13 @@ public IGStatusAdapter(@NonNull Context context, @NonNull Class<?> statusInfoCla

@Override
public int getCount() {
return itens.size();
return items.size();
}

@NonNull
@Override
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
var item = itens.get(position);
var item = items.get(position);
IGStatusViewHolder holder;
if (convertView == null) {
holder = new IGStatusViewHolder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ public CustomView(@NonNull ClassLoader loader, @NonNull XSharedPreferences prefe

@Override
public void doHook() throws Throwable {
var filter_itens = prefs.getString("css_theme", null);
if (TextUtils.isEmpty(filter_itens)) return;
var filter_items = prefs.getString("css_theme", null);
if (TextUtils.isEmpty(filter_items)) return;
cacheImages = new DrawableCache();
chacheDrawables = new HashMap<>();
mThreadService = Executors.newFixedThreadPool(8);

var sheet = CSSFactory.parseString(filter_itens, new URL("https://base.url/"));
var sheet = CSSFactory.parseString(filter_items, new URL("https://base.url/"));
XposedHelpers.findAndHookMethod(Activity.class, "onCreate", Bundle.class, new XC_MethodHook() {
@Override
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import de.robv.android.xposed.XposedHelpers;

public class IGStatus extends Feature {
public static ArrayList<Object> itens = new ArrayList<>();
public static ArrayList<Object> items = new ArrayList<>();
@SuppressLint("StaticFieldLeak")
private static IGStatusView mStatusContainer;

Expand Down Expand Up @@ -144,7 +144,7 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
XposedBridge.hookAllConstructors(clazz2, new XC_MethodHook() {
@Override
protected void afterHookedMethod(MethodHookParam param) throws Throwable {
itens.add(0, null);
items.add(0, null);
IGStatusAdapter mStatusAdapter = new IGStatusAdapter(WppCore.getMainActivity(), statusInfoClass);
mStatusContainer.setAdapter(mStatusAdapter);
mStatusContainer.updateList();
Expand All @@ -159,10 +159,10 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable {
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
var list1 = (List) param.args[2];
var list2 = (List) param.args[3];
itens.clear();
itens.add(0, null);
itens.addAll(list1);
itens.addAll(list2);
items.clear();
items.add(0, null);
items.addAll(list1);
items.addAll(list2);
mStatusContainer.updateList();
}
});
Expand All @@ -183,10 +183,10 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
if (lists.size() < 3) return;
var list1 = (List) lists.get(1).get(StatusListUpdates);
var list2 = (List) lists.get(2).get(StatusListUpdates);
itens.clear();
itens.add(0, null);
itens.addAll(list1);
itens.addAll(list2);
items.clear();
items.add(0, null);
items.addAll(list1);
items.addAll(list2);
mStatusContainer.updateList();
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public void doHook() throws Exception {
var adminGrp = prefs.getBoolean("admin_grp", false);
var showOnline = prefs.getBoolean("showonline", false);
var floatingMenu = prefs.getBoolean("floatingmenu", false);
var filter_itens = prefs.getString("filter_itens", null);
var filter_items = prefs.getString("filter_items", null);
var disable_defemojis = prefs.getBoolean("disable_defemojis", false);

propsBoolean.put(5171, filterSeen); // filtros de chat e grupos
Expand Down Expand Up @@ -153,8 +153,8 @@ public void doHook() throws Exception {
showOnline();
}

if (filter_itens != null) {
filterItens(filter_itens);
if (filter_items != null) {
filterItems(filter_items);
}

if (disable_defemojis) {
Expand All @@ -168,10 +168,10 @@ private void disable_defEmojis() throws Exception {
XposedBridge.hookMethod(defEmojiClass, XC_MethodReplacement.returnConstant(null));
}

private void filterItens(String filterItens) {
var itens = filterItens.split("\n");
private void filterItems(String filterItems) {
var items = filterItems.split("\n");
var idsFilter = new ArrayList<Integer>();
for (String item : itens) {
for (String item : items) {
var id = Utils.getID(item, "id");
if (id > 0) {
idsFilter.add(id);
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values-ar/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@
<string name="show_toast_on_contact_online_sum">إظهار إشعار عندما تكون جهة اتصال على الإنترنت</string>
<string name="new_context_menu_ui">واجهة جديدة لقائمة الإعدادات</string>
<string name="new_context_menu_ui_sum">سيتم تمكين قائمة إعدادات الرسالة الجديدة على نمط iOS.</string>
<string name="filter_itens_by_id">تصفية العناصر حسب المعرف</string>
<string name="filter_itens_by_id_sum">تصفية العناصر حسب اسم المعرف</string>
<string name="filter_items_by_id">تصفية العناصر حسب المعرف</string>
<string name="filter_items_by_id_sum">تصفية العناصر حسب اسم المعرف</string>
<string name="custom_theme_css">موضوع مخصص CSS</string>
<string name="custom_theme_css_sum">تخصيص واتساب باستخدام أنماط CSS</string>
<string name="antidisappearing">الرسائل المؤقتة</string>
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@
<string name="show_toast_on_contact_online_sum">Zeigt eine Nachricht, wenn ein Kontakt online ist</string>
<string name="new_context_menu_ui">Neue Kontextmenü-Oberfläche</string>
<string name="new_context_menu_ui_sum">Das neue Kontextmenü für Nachrichten im iOS-Stil wird aktiviert.</string>
<string name="filter_itens_by_id">Objekte nach ID filtern</string>
<string name="filter_itens_by_id_sum">Elemente nach Id-Namen filtern</string>
<string name="filter_items_by_id">Objekte nach ID filtern</string>
<string name="filter_items_by_id_sum">Elemente nach Id-Namen filtern</string>
<string name="custom_theme_css">Benutzerdefiniertes CSS Thema</string>
<string name="custom_theme_css_sum">Passen Sie Ihre WhatsApp mithilfe von CSS-Stilen an</string>
<string name="antidisappearing">Gegen verschwindende Nachrichten</string>
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@
<string name="show_toast_on_contact_online_sum">Mostrar una notificación cuando un contacto está en linea</string>
<string name="new_context_menu_ui">Nueva interfaz de menú contextual</string>
<string name="new_context_menu_ui_sum">Se habilitará el nuevo menú contextual de mensajes estilo iOS.</string>
<string name="filter_itens_by_id">Filtrar Items por ID</string>
<string name="filter_itens_by_id_sum">Filtrar items por nombre id</string>
<string name="filter_items_by_id">Filtrar Items por ID</string>
<string name="filter_items_by_id_sum">Filtrar items por nombre id</string>
<string name="custom_theme_css">Tema personalizado de CSS</string>
<string name="custom_theme_css_sum">Personaliza tu WhatsApp usando estilos CSS</string>
<string name="antidisappearing">Anti Desaparición de mensajes Temporales</string>
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@
<string name="show_toast_on_contact_online_sum">Show a toast when a contact is online</string>
<string name="new_context_menu_ui">New Context Menu UI</string>
<string name="new_context_menu_ui_sum">The new iOS-style message context menu will be enabled.</string>
<string name="filter_itens_by_id">Filter Itens By ID</string>
<string name="filter_itens_by_id_sum">Filter items by id name</string>
<string name="filter_items_by_id">Filter Items By ID</string>
<string name="filter_items_by_id_sum">Filter items by id name</string>
<string name="custom_theme_css">Custom Theme CSS</string>
<string name="custom_theme_css_sum">Customize your WhatsApp using CSS styles</string>
<string name="antidisappearing">Anti Disappearing Messages</string>
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values-id/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ Apakah Anda ingin mulai ulang WhatsApp?</string>
<string name="show_toast_on_contact_online_sum">Tampilkan notifikasi mengambang ketika kontak sedang online</string>
<string name="new_context_menu_ui">Menu UI Konteks Baru</string>
<string name="new_context_menu_ui_sum">Aktifkan menu konteks pesan baru bergaya iOS</string>
<string name="filter_itens_by_id">Filter Item Berdasarkan ID</string>
<string name="filter_itens_by_id_sum">Filter item berdasarkan nama ID</string>
<string name="filter_items_by_id">Filter Item Berdasarkan ID</string>
<string name="filter_items_by_id_sum">Filter item berdasarkan nama ID</string>
<string name="custom_theme_css">Tema Khusus CSS</string>
<string name="custom_theme_css_sum">Sesuaikan WhatsApp Anda menggunakan gaya CSS</string>
<string name="antidisappearing">Anti Hapus Pesan Sementara</string>
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values-in/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,8 @@
<string name="show_toast_on_contact_online_sum">Tampilkan notifikasi mengambang ketika kontak sedang online</string>
<string name="new_context_menu_ui">Menu UI Konteks Baru</string>
<string name="new_context_menu_ui_sum">Aktifkan menu konteks pesan baru bergaya iOS</string>
<string name="filter_itens_by_id">Filter Item Berdasarkan ID</string>
<string name="filter_itens_by_id_sum">Filter item berdasarkan nama ID</string>
<string name="filter_items_by_id">Filter Item Berdasarkan ID</string>
<string name="filter_items_by_id_sum">Filter item berdasarkan nama ID</string>
<string name="custom_theme_css">Tema Khusus CSS</string>
<string name="custom_theme_css_sum">Sesuaikan WhatsApp Anda menggunakan gaya CSS</string>
<string name="antidisappearing">Anti Hapus Pesan Sementara</string>
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@
<string name="show_toast_on_contact_online_sum">Mostra una notifica toast quando un contatto è online</string>
<string name="new_context_menu_ui">Nuova UI Menu Contestuale</string>
<string name="new_context_menu_ui_sum">Verrà abilitato il nuovo menu contestuale del messaggio in stile iOS.</string>
<string name="filter_itens_by_id">Filtra Elementi Per ID</string>
<string name="filter_itens_by_id_sum">Filtra elementi per nome id</string>
<string name="filter_items_by_id">Filtra Elementi Per ID</string>
<string name="filter_items_by_id_sum">Filtra elementi per nome id</string>
<string name="custom_theme_css">Tema Personalizzato CSS</string>
<string name="custom_theme_css_sum">Personalizza il tuo WhatsApp utilizzando gli stili CSS</string>
<string name="antidisappearing">Anti Scomparsa Messaggi</string>
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values-pt/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@
<string name="show_toast_on_contact_online_sum">Mostra uma notificação toast quando qualquer contato entrar online.</string>
<string name="new_context_menu_ui">Nova IU do menu de contexto</string>
<string name="new_context_menu_ui_sum">Habilite o novo menu de contexto de mensagens no estilo iOS para edição de mensagens.</string>
<string name="filter_itens_by_id">Filtrar itens por ID</string>
<string name="filter_itens_by_id_sum">Você pode remover quase tudo no WhatsApp (visualmente) usando filtro de itens.</string>
<string name="filter_items_by_id">Filtrar items por ID</string>
<string name="filter_items_by_id_sum">Você pode remover quase tudo no WhatsApp (visualmente) usando filtro de items.</string>
<string name="custom_theme_css">Tema personalizado CSS</string>
<string name="custom_theme_css_sum">Personalize seu WhatsApp usando código CSS.</string>
<string name="antidisappearing">Anti-deletar mensagens temporárias</string>
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@
<string name="show_toast_on_contact_online_sum">Показывать всплывающее уведомление, когда контакт в сети</string>
<string name="new_context_menu_ui">Новый пользовательский интерфейс контекстного меню</string>
<string name="new_context_menu_ui_sum">Новое контекстное меню сообщений в стиле iOS.</string>
<string name="filter_itens_by_id">Отфильтровать элементы по ID</string>
<string name="filter_itens_by_id_sum">Фильтровать по id имени</string>
<string name="filter_items_by_id">Отфильтровать элементы по ID</string>
<string name="filter_items_by_id_sum">Фильтровать по id имени</string>
<string name="custom_theme_css">Пользовательская тема CSS</string>
<string name="custom_theme_css_sum">Настройте WhatsApp с помощью стилей CSS</string>
<string name="antidisappearing">Защита \"Исчезающих Сообщений\"</string>
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values-tr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@
<string name="show_toast_on_contact_online_sum">Bir kişi çevrimiçi olduğunda bir tost mesajı göster</string>
<string name="new_context_menu_ui">Yeni Bağlam Menüsü Kullanıcı Arayüzü</string>
<string name="new_context_menu_ui_sum">Yeni iOS tarzı mesaj içerik menüsü etkinleştirilecektir.</string>
<string name="filter_itens_by_id">Kimliğe Göre Filtrele</string>
<string name="filter_itens_by_id_sum">Öğeleri kimlik adına göre filtrele</string>
<string name="filter_items_by_id">Kimliğe Göre Filtrele</string>
<string name="filter_items_by_id_sum">Öğeleri kimlik adına göre filtrele</string>
<string name="custom_theme_css">Özel CSS Teması</string>
<string name="custom_theme_css_sum">CSS stillerini kullanarak WhatsApp\'ınızı özelleştirin</string>
<string name="antidisappearing">Anti Kaybolan Mesajlar</string>
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@
<string name="show_toast_on_contact_online_sum">Show a toast when a contact is online</string>
<string name="new_context_menu_ui">New Context Menu UI</string>
<string name="new_context_menu_ui_sum">The new iOS-style message context menu will be enabled.</string>
<string name="filter_itens_by_id">Filter Itens By ID</string>
<string name="filter_itens_by_id_sum">Filter items by id name</string>
<string name="filter_items_by_id">Filter Items By ID</string>
<string name="filter_items_by_id_sum">Filter items by id name</string>
<string name="custom_theme_css">Custom Theme CSS</string>
<string name="custom_theme_css_sum">Customize your WhatsApp using CSS styles</string>
<string name="antidisappearing">Anti Disappearing Messages</string>
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/xml/fragment_customization.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@
app:title="@string/hide_tabs_on_home" />

<EditTextPreference
app:key="filter_itens"
android:summary="@string/filter_itens_by_id_sum"
app:title="@string/filter_itens_by_id" />
app:key="filter_items"
android:summary="@string/filter_items_by_id_sum"
app:title="@string/filter_items_by_id" />

<EditTextPreference
app:key="css_theme"
Expand Down