Skip to content

Commit

Permalink
Different error for Muzei
Browse files Browse the repository at this point in the history
  • Loading branch information
Kennyc1012 committed Nov 10, 2016
1 parent 5784c64 commit fe101c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import com.google.android.apps.muzei.api.Artwork;
import com.google.android.apps.muzei.api.RemoteMuzeiArtSource;
import com.kenny.openimgur.R;
import com.kenny.openimgur.activities.MuzeiSettingsActivity;
import com.kenny.openimgur.api.ApiClient;
import com.kenny.openimgur.api.responses.GalleryResponse;
Expand All @@ -36,11 +37,7 @@ public class ImgurMuzeiService extends RemoteMuzeiArtSource {
private static final String TAG = "ImgurMuzeiService";

// If unable to get an image, DickButt will be shown, dealwithit.gif
private static final String FALLBACK_URL = "http://i.imgur.com/ICt6W7X.png";

private static final String FALLBACK_TITLE = "DickButt";

private static final String FALLBACK_BYLINE = "K.C. Green";
private static final String FALLBACK_URL = "http://i.imgur.com/myiMdIq.jpeg";

private static final String FALLBACK_SUBREDDIT = "aww";

Expand Down Expand Up @@ -127,8 +124,8 @@ protected void onTryUpdate(int reason) throws RetryException {
}
} else {
url = FALLBACK_URL;
title = FALLBACK_TITLE;
byline = FALLBACK_BYLINE;
title = getString(R.string.muzei_error_title);
byline = getString(R.string.muzei_error_byline);
}

uri = Uri.parse(url);
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,8 @@
<string name="muzei_source">Image Source</string>
<string name="muzei_description">Imgur images for Muzei</string>
<string name="muzei_topic">Topic</string>
<string name="muzei_error_title">Error</string>
<string name="muzei_error_byline">Unable to display wallpaper</string>

<!-- Reporting -->
<string name="report">Report</string>
Expand Down

0 comments on commit fe101c1

Please sign in to comment.