-
-
Notifications
You must be signed in to change notification settings - Fork 553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix modified indicator #1204
Fix modified indicator #1204
Conversation
@@ -36,7 +36,7 @@ export function createTitleFeed(state$) { | |||
const modified$ = state$ | |||
.map(state => state.document.get('notebook')) | |||
.scan((prev, notebook) => ({ | |||
modified: prev.notebook === notebook, | |||
modified: prev.notebook !== notebook, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Immutable.is(prev.notebook, notebook) === false
will behave the same.
0e7e20d
to
313cf11
Compare
I just realized... We're missing logic for saved. All we know is if it was modified from last time. The logic should be modified: saved.notebook !== current.notebook Yet we don't have |
Current coverage is 91.57% (diff: 100%)@@ master #1204 diff @@
==========================================
Files 57 57
Lines 1530 1531 +1
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 1401 1402 +1
Misses 129 129
Partials 0 0
|
Is this still WIP? |
It fixes a bug yet doesn't fix the modified feature. It can be merged, we've just got some work ahead of us. I think I know what to do for a follow up PR. |
Merging, thank you! |
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread. |
This addresses part of #1165
But it still fails in a interesting way: