Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 2dc25ec2 authored by Michael Bestas's avatar Michael Bestas
Browse files

LineageParts: Convert resource switch statements to if-else

Change-Id: Ie1c61eaf311c52c68ab02208ffd023119cc3487f
parent 49ec288b
Loading
Loading
Loading
Loading
+13 −21
Original line number Diff line number Diff line
/*
 * SPDX-FileCopyrightText: 2015 The CyanogenMod Project
 * SPDX-FileCopyrightText: 2017-2023 The LineageOS Project
 * SPDX-FileCopyrightText: 2017-2026 The LineageOS Project
 * SPDX-License-Identifier: Apache-2.0
 */

@@ -267,26 +267,18 @@ public class ContributorsCloudFragment extends Fragment implements SearchView.On

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
            case R.id.contributors_search:
        final int itemId = item.getItemId();
        if (itemId == R.id.contributors_search) {
            mSearchView.setQuery("", false);
            mSelectedContributor = -1;

            // Load the data from the database and fill the image
            ContributorCloudLoaderTask task = new ContributorCloudLoaderTask(false, false);
            task.execute();
                break;

            case R.id.contributor_info:
        } else if (itemId == R.id.contributor_info) {
            showUserInfo(getActivity());
                break;

            case R.id.contributions_info:
        } else if (itemId == R.id.contributions_info) {
            showContributorsInfo(getActivity());
                break;

            default:
                break;
        }
        return super.onContextItemSelected(item);
    }