Push conditionals inside branch expressions
This commit is contained in:
parent
6909d1e527
commit
31cffa68c5
7 changed files with 26 additions and 26 deletions
|
|
@ -212,7 +212,7 @@ public class StoredDirectoryHelper {
|
|||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return docTree == null ? Uri.fromFile(ioTree).toString() : docTree.getUri().toString();
|
||||
return (docTree == null ? Uri.fromFile(ioTree) : docTree.getUri()).toString();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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