|
@@ -126,11 +126,18 @@ public class CSearchResultDialogFragment extends CBasicBottomSheetDialogFragment
|
|
|
searchReplace.findSelections();
|
|
|
searchReplace.replaceAll(content);
|
|
|
CThreadPoolUtils.getInstance().executeMain(() -> {
|
|
|
- if (replaceListener != null) {
|
|
|
- replaceListener.onReplaceEnd();
|
|
|
+ try {
|
|
|
+ if (replaceListener != null) {
|
|
|
+ pdfView.getCPdfReaderView().reloadPages();
|
|
|
+ replaceListener.onReplaceEnd();
|
|
|
+ readerView.getEditManager().onUndoRedoCallback(readerView.getPageNum(), false, false);
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ //e.printStackTrace();
|
|
|
+ } finally {
|
|
|
+ loadingDialog.dismiss();
|
|
|
+ dismiss();
|
|
|
}
|
|
|
- loadingDialog.dismiss();
|
|
|
- dismiss();
|
|
|
});
|
|
|
}
|
|
|
});
|
|
@@ -152,7 +159,7 @@ public class CSearchResultDialogFragment extends CBasicBottomSheetDialogFragment
|
|
|
int resultCount = 0;
|
|
|
for (CSearchTextInfo searchTextInfo : searchTextInfos) {
|
|
|
if (!searchTextInfo.isHeader) {
|
|
|
- resultCount +=1;
|
|
|
+ resultCount += 1;
|
|
|
}
|
|
|
}
|
|
|
tvResultInfo.setText(getContext().getString(R.string.tools_search_result_found, resultCount));
|