Push conditionals inside branch expressions
This commit is contained in:
parent
710a840de6
commit
166cdd50f4
7 changed files with 26 additions and 26 deletions
|
|
@ -224,9 +224,10 @@ public class MissionsFragment extends Fragment {
|
|||
mList.setAdapter(mAdapter);
|
||||
|
||||
if (mSwitch != null) {
|
||||
mSwitch.setIcon(mLinear
|
||||
? ThemeHelper.resolveResourceIdFromAttr(requireContext(), R.attr.ic_grid)
|
||||
: ThemeHelper.resolveResourceIdFromAttr(requireContext(), R.attr.ic_list));
|
||||
mSwitch.setIcon(ThemeHelper.resolveResourceIdFromAttr(
|
||||
requireContext(), mLinear
|
||||
? R.attr.ic_grid
|
||||
: R.attr.ic_list));
|
||||
mSwitch.setTitle(mLinear ? R.string.grid : R.string.list);
|
||||
mPrefs.edit().putBoolean("linear", mLinear).apply();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue