mirror of
https://codeberg.org/gitnex/GitNex.git
synced 2024-12-16 15:48:13 +08:00
Fix md rendering after editing file (#954)
### Describe what your pull request does and which issue you’re targeting fixes #951 and you can review/merge it - [X] I carefully read the [contribution guidelines](https://codeberg.org/GitNex/GitNex/src/branch/main/CONTRIBUTING.md). - [X] I'm following the code standards as defined [here](https://codeberg.org/gitnex/GitNex/wiki/Code-Standards). - [X] By submitting this pull request, I permit GitNex to license my work under the [GNU General Public License v3](https://codeberg.org/GitNex/GitNex/src/branch/main/LICENSE). Co-authored-by: qwerty287 <ndev@web.de> Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/954 Reviewed-by: M M Arif <mmarif@noreply.codeberg.org> Co-authored-by: qwerty287 <qwerty287@noreply.codeberg.org> Co-committed-by: qwerty287 <qwerty287@noreply.codeberg.org>
This commit is contained in:
parent
5544ae4248
commit
1e8c8efd6b
@ -148,10 +148,18 @@ public class FileViewActivity extends BaseActivity implements BottomSheetFileVie
|
||||
|
||||
runOnUiThread(() -> {
|
||||
binding.photoView.setVisibility(View.GONE);
|
||||
binding.markdownFrame.setVisibility(View.GONE);
|
||||
|
||||
binding.contents.setVisibility(View.VISIBLE);
|
||||
binding.contents.setContent(text, fileExtension);
|
||||
|
||||
if(tinyDB.getBoolean("enableMarkdownInFileView")) {
|
||||
Markdown.render(ctx, EmojiParser.parseToUnicode(text), binding.markdown);
|
||||
|
||||
binding.contents.setVisibility(View.GONE);
|
||||
binding.markdownFrame.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
binding.markdownFrame.setVisibility(View.GONE);
|
||||
binding.contents.setVisibility(View.VISIBLE);
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user