From 8c86bd94d6eb2f3e3511b8ceb094bb5322b812e2 Mon Sep 17 00:00:00 2001 From: Dave Pearson Date: Mon, 27 Jan 2025 16:37:38 +0000 Subject: [PATCH] :bug: Temporarily disable editing image Raindrops See #123. --- ChangeLog.md | 2 ++ src/braindrop/app/screens/main.py | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/ChangeLog.md b/ChangeLog.md index f5435fd..a188ab3 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -11,6 +11,8 @@ - Fixed focus getting lost for a moment if it was within the details panel and the details panel was closed. ([#114](https://github.com/davep/braindrop/issues/114)) +- Temporarily disabled the ability to edit a Raindrop that is an uploaded + image type. ([#123](https://github.com/davep/braindrop/issues/123)) ## v0.6.1 diff --git a/src/braindrop/app/screens/main.py b/src/braindrop/app/screens/main.py index 340a3cc..dbe9251 100644 --- a/src/braindrop/app/screens/main.py +++ b/src/braindrop/app/screens/main.py @@ -672,6 +672,19 @@ async def action_edit_raindrop_command(self) -> None: if (raindrop := self._current_raindrop("edit")) is None: return + # For the moment, don't allow editing of uploaded images. + # https://github.com/davep/braindrop/issues/123 + if raindrop.type == "image": + self.notify( + "Editing of Raindrops that are images can cause the image to be lost. " + "While I investigate why this is I'm disabling the editing of any " + "Raindrop that is an image type.", + title="Editing if images is disabled", + severity="warning", + timeout=8, + ) + return + # If we've got a draft, and it's for the current raindrop... if ( self._draft_raindrop is not None