-
Notifications
You must be signed in to change notification settings - Fork 95
New album doesn't show after create unless you refresh page #135
Comments
This is interesting because using the |
In both case you should be placed in the new album. So that is indeed surprising. |
I'll take a look at it today.
…On Wednesday, December 12, 2018, Benoît Viguier ***@***.***> wrote:
In both case you should be placed in the new album. So that is indeed
surprising.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<LycheeOrg/Lychee#135 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADsserR0RGrA21_mN0PfPB7PkwhkD2CFks5u4LU1gaJpZM4Y9nkN>
.
--
Brian E. Bennett
Web: ohheybrian.com
Twitter: @bennettscience <http://www.twitter.com/#!/bennettscience>
574.323.8519
|
@ildyria I found the bug, but I can't figure out why a particular change was made. In if (data!==false && isNumber(data)) {
if(IDs != null) // If used with the hotkey, IDs == null.
{
callback(IDs, data, false); // we do not confirm
}
else {
albums.refresh();
lychee.goto(data)
}
} else {
lychee.error(null, params, data)
} What is IDs in there for? When you click 'Create album,' it captures a mouse event, which throws I also can't pinpoint where the mouse event is bound. Using the hotkey and clicking the modal 'Create' does not register a mouse event. Using the menu, clicking 'New Album' and then 'Create' does register. I need to dig more there, but this seems to be the culprit. |
@bennettscience |
Yeah, I had a quick look and saw that, but if you trace it back the callback (as @ildyria pointed to) is used for moving and copying photos. Harder to read, but more elegant than my solution for moving :) I hadn't spotted that |
From what I can tell, the menu calls album.add() with no IDs (so null) too, so that might be a dead end :( |
@d7415 I added that comment for context. I think defining a callback in the button action would solve the problem. I haven't rolled my checkout back to |
Actually, I created workaround (just for me, because I don’t know what any of this parameters does) but in main.js --- old_main.js 2018-12-12 14:46:05.081012192 +0100
+++ main.js 2018-12-12 14:45:29.412525086 +0100
@@ -405,7 +405,7 @@
api.post('Album::add', params, function (data) {
if (data !== false && isNumber(data)) {
- if (IDs != null) {
+ if (IDs != null && callback !=null) {
callback(IDs, data, false); // we do not confirm
} else {
albums.refresh(); |
This comment has been minimized.
This comment has been minimized.
Should be fixed with last commit. |
Since commit 6ae1838 there is issue when I create new album. Before I refresh my page I cannot see newly created album, and only after that I can enter in it. Up to cfdcf75 after new album had been created it was default working path of my Lychee.
I checked behaviour on multiple browsers - Firefox, Chrome, Vivaldi and Opera. When I revert to
git reset --hard cfdcf752816846376f93c2d47e3fa91fa8036548
problem doesn't exist, but after i pull commit 6ae1838
git reset --hard 6ae18380acd2f4687187714bf81a0727fe50f188
my Lychee acts as described – every time I create new album I have to refresh page just to load new album on the list, enter that album and only than I can upload pictures into it.
The text was updated successfully, but these errors were encountered: