Conversation
|
On further consideration it is not necessary to explicitly null check in the |
This reverts commit 7771bd2.
| } | ||
| } | ||
|
|
||
| // Vala compiler returns false if metadata null |
There was a problem hiding this comment.
Does Vala do this check because the argument isn't ending with ? or something else?
| assert (removed); | ||
|
|
||
| assert (!dirty.contains (photo)); | ||
| if (!removed || dirty.contains (photo)) { |
There was a problem hiding this comment.
Checking dirty seems redundant here since it is within an if-statement of the same check
|
I just have a couple comments, and there's a conflict to fix. Otherwise this seems good to me |

The codebase contains a lot of places where the app just terminates due to an assertion failure. This does not seem necessary for production code and these have been replaced with critical messages or throwing an error and the subsequent code either omitted or continued as seems appropriate. If reviewers feel an assertion failure would cause user data corruption on continued use then it should be replaced with a call to AppWindow.panic which at least logs a message before terminating.
There were a few places where a null could theoretically be dereferenced.
It is difficult to know whether assertion failure or null dereferencing could occur in practice as the code is extremely convoluted.