Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions FiredTVLauncher/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,13 @@ ISharedPreferencesEditor editPrefs ()
return prefs.Edit ();
}

public static string GetWallpaperFilename()
public static string GetWallpaperFilename(bool checkExist = true)
{
try {
var path = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments);
var filename = System.IO.Path.Combine(path, "wallpaper.png");

if (File.Exists (filename))
if (File.Exists (filename) || !checkExist)
return filename;
} catch {
}
Expand Down
4 changes: 2 additions & 2 deletions FiredTVLauncher/SettingsActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ protected override void OnCreate (Bundle bundle)
try {
var http = new System.Net.WebClient ();
var bytes = http.DownloadData (url);
var filename = Settings.GetWallpaperFilename ();
var filename = Settings.GetWallpaperFilename (false);
System.IO.File.WriteAllBytes (filename, bytes);
} catch (Exception ex) {

Settings.Instance.WallpaperUrl = string.Empty;

Toast.MakeText (this, "Failed to Download Wallpaper", ToastLength.Long).Show ();
RunOnUiThread (() => Toast.MakeText (this, "Failed to Download Wallpaper", ToastLength.Long).Show ());
Log.Error ("Downloading Wallpaper Failed", ex);
}

Expand Down