small theme fixes

This commit is contained in:
julian 2023-06-09 12:44:47 -06:00
parent a8a5e8b573
commit 498185d701
2 changed files with 5 additions and 4 deletions

View file

@ -30,8 +30,6 @@ final coinIconProvider = Provider.family<String, Coin>((ref, coin) {
case Coin.dogecoin: case Coin.dogecoin:
case Coin.dogecoinTestNet: case Coin.dogecoinTestNet:
return assets.dogecoin; return assets.dogecoin;
case Coin.eCash:
return assets.bitcoin;
case Coin.epicCash: case Coin.epicCash:
return assets.epicCash; return assets.epicCash;
case Coin.firo: case Coin.firo:
@ -48,7 +46,7 @@ final coinIconProvider = Provider.family<String, Coin>((ref, coin) {
case Coin.ethereum: case Coin.ethereum:
return assets.ethereum; return assets.ethereum;
default: default:
return assets.bitcoin; return assets.stackIcon;
} }
} else if (assets is ThemeAssetsV2) { } else if (assets is ThemeAssetsV2) {
return (assets).coinIcons[coin.mainNetVersion]!; return (assets).coinIcons[coin.mainNetVersion]!;

View file

@ -98,7 +98,10 @@ class ThemeService {
await db.isar.writeTxn(() async { await db.isar.writeTxn(() async {
await db.isar.stackThemes.delete(isarId); await db.isar.stackThemes.delete(isarId);
}); });
await Directory("${themesDir.path}/$themeId").delete(recursive: true); final dir = Directory("${themesDir.path}/$themeId");
if (dir.existsSync()) {
await dir.delete(recursive: true);
}
} else { } else {
Logging.instance.log( Logging.instance.log(
"Failed to delete theme $themeId", "Failed to delete theme $themeId",