mirror of
https://github.com/k0shk0sh/FastHub.git
synced 2025-12-08 19:05:54 +00:00
fixed a bug in code viewer where we might endup in infinite loop if we failed to display the data from the url.
This commit is contained in:
parent
0d8e2ef22f
commit
c40fa9d1ca
@ -95,7 +95,7 @@ public class SchemeParser {
|
||||
if (gist != null) {
|
||||
return GistView.createIntent(context, gist);
|
||||
}
|
||||
} else if (HOST_DEFAULT.equals(data.getHost())) {
|
||||
} else {
|
||||
Intent userIntent = getUser(context, data);
|
||||
Intent pullRequestIntent = getPullRequestIntent(context, data);
|
||||
Intent issueIntent = getIssueIntent(context, data);
|
||||
|
||||
@ -67,9 +67,7 @@ class ViewerPresenter extends BasePresenter<ViewerMvp.View> implements ViewerMvp
|
||||
if (downloadedStream == null) {
|
||||
manageSubscription(FileModel.get(url)
|
||||
.subscribe(fileModel -> {
|
||||
if (fileModel == null) {
|
||||
onWorkOnline();
|
||||
} else {
|
||||
if (fileModel != null) {
|
||||
isImage = MarkDownProvider.isImage(fileModel.getFullUrl());
|
||||
if (isImage) {
|
||||
sendToView(view -> view.onSetImageUrl(fileModel.getFullUrl()));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user