Read theme in app dir if doesn't exist in user dir
This commit is contained in:
parent
264c2ab16b
commit
298ab30672
|
@ -251,7 +251,6 @@ class Backend:
|
|||
ui_state = await self.ui_state.read()
|
||||
history = await self.history.read()
|
||||
theme = await Theme(self, settings["theme"]).read()
|
||||
print(theme)
|
||||
|
||||
return (settings, ui_state, history, theme)
|
||||
|
||||
|
|
|
@ -280,7 +280,12 @@ class Theme(DataFile):
|
|||
@property
|
||||
def path(self) -> Path:
|
||||
data_dir = Path(self.backend.appdirs.user_data_dir)
|
||||
return data_dir / "themes" / self.filename
|
||||
user_path = data_dir / "themes" / self.filename
|
||||
|
||||
if not user_path.exists():
|
||||
return Path("src") / "themes" / self.filename
|
||||
|
||||
return user_path
|
||||
|
||||
|
||||
async def default_data(self) -> str:
|
||||
|
|
Loading…
Reference in New Issue
Block a user