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

Remove icon duplicates and fix some theming issues #7518

Merged
merged 5 commits into from
Mar 15, 2022
Merged
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
Expand Up @@ -21,7 +21,6 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.content.res.AppCompatResources;
import androidx.appcompat.widget.AppCompatImageView;
import androidx.fragment.app.Fragment;
import androidx.preference.PreferenceManager;
Expand Down Expand Up @@ -51,8 +50,6 @@
import io.reactivex.rxjava3.schedulers.Schedulers;

public class PeertubeInstanceListFragment extends Fragment {
private static final int MENU_ITEM_RESTORE_ID = 123456;

private final List<PeertubeInstance> instanceList = new ArrayList<>();
private PeertubeInstance selectedInstance;
private String savedInstanceListKey;
Expand Down Expand Up @@ -142,17 +139,12 @@ public void onDestroy() {
public void onCreateOptionsMenu(@NonNull final Menu menu,
@NonNull final MenuInflater inflater) {
super.onCreateOptionsMenu(menu, inflater);

final MenuItem restoreItem = menu
.add(Menu.NONE, MENU_ITEM_RESTORE_ID, Menu.NONE, R.string.restore_defaults);
restoreItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
restoreItem.setIcon(AppCompatResources.getDrawable(requireContext(),
R.drawable.ic_settings_backup_restore));
inflater.inflate(R.menu.menu_chooser_fragment, menu);
}

@Override
public boolean onOptionsItemSelected(final MenuItem item) {
if (item.getItemId() == MENU_ITEM_RESTORE_ID) {
if (item.getItemId() == R.id.menu_item_restore_default) {
restoreDefaults();
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
Expand All @@ -17,7 +16,6 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.content.res.AppCompatResources;
import androidx.appcompat.widget.AppCompatImageView;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.ItemTouchHelper;
Expand Down Expand Up @@ -107,12 +105,8 @@ public void onPause() {
public void onCreateOptionsMenu(@NonNull final Menu menu,
@NonNull final MenuInflater inflater) {
super.onCreateOptionsMenu(menu, inflater);

final MenuItem restoreItem = menu.add(R.string.restore_defaults);
restoreItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
restoreItem.setIcon(AppCompatResources.getDrawable(requireContext(),
R.drawable.ic_settings_backup_restore));
restoreItem.setOnMenuItemClickListener(ev -> {
inflater.inflate(R.menu.menu_chooser_fragment, menu);
menu.findItem(R.id.menu_item_restore_default).setOnMenuItemClickListener(item -> {
restoreDefaults();
return true;
});
Expand Down
10 changes: 0 additions & 10 deletions app/src/main/res/drawable-night/ic_add.xml

This file was deleted.

10 changes: 0 additions & 10 deletions app/src/main/res/drawable-night/ic_add_circle_outline.xml

This file was deleted.

10 changes: 0 additions & 10 deletions app/src/main/res/drawable-night/ic_apps.xml

This file was deleted.

10 changes: 0 additions & 10 deletions app/src/main/res/drawable-night/ic_arrow_back.xml

This file was deleted.

9 changes: 0 additions & 9 deletions app/src/main/res/drawable-night/ic_asterisk.xml

This file was deleted.

10 changes: 0 additions & 10 deletions app/src/main/res/drawable-night/ic_attach_money.xml

This file was deleted.

10 changes: 0 additions & 10 deletions app/src/main/res/drawable-night/ic_backup.xml

This file was deleted.

10 changes: 0 additions & 10 deletions app/src/main/res/drawable-night/ic_bookmark.xml

This file was deleted.

10 changes: 0 additions & 10 deletions app/src/main/res/drawable-night/ic_bug_report.xml

This file was deleted.

9 changes: 0 additions & 9 deletions app/src/main/res/drawable-night/ic_campaign.xml

This file was deleted.

10 changes: 0 additions & 10 deletions app/src/main/res/drawable-night/ic_cast.xml

This file was deleted.

16 changes: 0 additions & 16 deletions app/src/main/res/drawable-night/ic_child_care.xml

This file was deleted.

9 changes: 0 additions & 9 deletions app/src/main/res/drawable-night/ic_close.xml

This file was deleted.

10 changes: 0 additions & 10 deletions app/src/main/res/drawable-night/ic_cloud_download.xml

This file was deleted.

10 changes: 0 additions & 10 deletions app/src/main/res/drawable-night/ic_computer.xml

This file was deleted.

10 changes: 0 additions & 10 deletions app/src/main/res/drawable-night/ic_crop_portrait.xml

This file was deleted.

10 changes: 0 additions & 10 deletions app/src/main/res/drawable-night/ic_delete.xml

This file was deleted.

10 changes: 0 additions & 10 deletions app/src/main/res/drawable-night/ic_directions_bike.xml

This file was deleted.

10 changes: 0 additions & 10 deletions app/src/main/res/drawable-night/ic_directions_car.xml

This file was deleted.

10 changes: 0 additions & 10 deletions app/src/main/res/drawable-night/ic_done.xml

This file was deleted.

10 changes: 0 additions & 10 deletions app/src/main/res/drawable-night/ic_drag_handle.xml

This file was deleted.

10 changes: 0 additions & 10 deletions app/src/main/res/drawable-night/ic_expand_more.xml

This file was deleted.

9 changes: 0 additions & 9 deletions app/src/main/res/drawable-night/ic_explore.xml

This file was deleted.

9 changes: 0 additions & 9 deletions app/src/main/res/drawable-night/ic_fastfood.xml

This file was deleted.

10 changes: 0 additions & 10 deletions app/src/main/res/drawable-night/ic_favorite.xml

This file was deleted.

10 changes: 0 additions & 10 deletions app/src/main/res/drawable-night/ic_file_download.xml

This file was deleted.

10 changes: 0 additions & 10 deletions app/src/main/res/drawable-night/ic_filter_list.xml

This file was deleted.

10 changes: 0 additions & 10 deletions app/src/main/res/drawable-night/ic_fitness_center.xml

This file was deleted.

10 changes: 0 additions & 10 deletions app/src/main/res/drawable-night/ic_headset.xml

This file was deleted.

9 changes: 0 additions & 9 deletions app/src/main/res/drawable-night/ic_help.xml

This file was deleted.

Loading