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

View file

@ -98,7 +98,10 @@ class ThemeService {
await db.isar.writeTxn(() async {
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 {
Logging.instance.log(
"Failed to delete theme $themeId",