|
@@ -126,11 +126,18 @@ public class CSearchResultDialogFragment extends CBasicBottomSheetDialogFragment
|
|
searchReplace.findSelections();
|
|
searchReplace.findSelections();
|
|
searchReplace.replaceAll(content);
|
|
searchReplace.replaceAll(content);
|
|
CThreadPoolUtils.getInstance().executeMain(() -> {
|
|
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;
|
|
int resultCount = 0;
|
|
for (CSearchTextInfo searchTextInfo : searchTextInfos) {
|
|
for (CSearchTextInfo searchTextInfo : searchTextInfos) {
|
|
if (!searchTextInfo.isHeader) {
|
|
if (!searchTextInfo.isHeader) {
|
|
- resultCount +=1;
|
|
|
|
|
|
+ resultCount += 1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
tvResultInfo.setText(getContext().getString(R.string.tools_search_result_found, resultCount));
|
|
tvResultInfo.setText(getContext().getString(R.string.tools_search_result_found, resultCount));
|