mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 15:15:51 +03:00
Merge pull request #5822 from nextcloud/conflictToast
Fix crash while showing ConflictDialog
This commit is contained in:
commit
ade73c3e57
2 changed files with 9 additions and 7 deletions
|
@ -46,8 +46,7 @@ import androidx.fragment.app.FragmentTransaction;
|
|||
|
||||
|
||||
/**
|
||||
* Wrapper activity which will be launched if keep-in-sync file will be modified by external
|
||||
* application.
|
||||
* Wrapper activity which will be launched if keep-in-sync file will be modified by external application.
|
||||
*/
|
||||
public class ConflictsResolveActivity extends FileActivity implements OnConflictDecisionMadeListener {
|
||||
/**
|
||||
|
@ -226,7 +225,7 @@ public class ConflictsResolveActivity extends FileActivity implements OnConflict
|
|||
}
|
||||
|
||||
private void showErrorAndFinish() {
|
||||
Toast.makeText(this, R.string.conflict_dialog_error, Toast.LENGTH_LONG).show();
|
||||
runOnUiThread(() -> Toast.makeText(this, R.string.conflict_dialog_error, Toast.LENGTH_LONG).show());
|
||||
finish();
|
||||
}
|
||||
|
||||
|
|
|
@ -214,13 +214,16 @@ public class PreviewTextFileFragment extends PreviewTextFragment {
|
|||
|
||||
if (textView != null) {
|
||||
mOriginalText = stringWriter.toString();
|
||||
mSearchView.setOnQueryTextListener(PreviewTextFileFragment.this);
|
||||
|
||||
setText(textView, mOriginalText, getFile(), requireActivity());
|
||||
|
||||
if (mSearchView != null) {
|
||||
mSearchView.setOnQueryTextListener(PreviewTextFileFragment.this);
|
||||
|
||||
if (mSearchOpen) {
|
||||
mSearchView.setQuery(mSearchQuery, true);
|
||||
}
|
||||
}
|
||||
|
||||
textView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue