Skip to content
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

Detect file changes and reload #105

Merged
merged 2 commits into from
Dec 20, 2016
Merged

Detect file changes and reload #105

merged 2 commits into from
Dec 20, 2016

Conversation

MaanooAk
Copy link
Contributor

Based on #86 with some additions.

Operations

  • Open an markdown file -> start watching

and also store the watcher so it can be stopped

  • Detected file changes -> If the relevant file has not been saved in editor, give user a prompt to reload it, otherwise reload it automatically.

and flag it saved

  • Close a tab or quit the app -> stop watching relevant files.
  • When file saved -> pause watching until the file is saved

Reload message

{
  type: 'question',
  title: 'EME',
  message: `The ${filename} has been modyfied.`,
  detail: 'Your changes will be lost if you reload the file.',
  buttons: ['Reload', 'Don\'t Reload']
}

@egoist egoist self-requested a review December 14, 2016 01:29
@egoist egoist merged commit a58a589 into egoist:dev Dec 20, 2016
@MaanooAk MaanooAk deleted the watchers branch December 20, 2016 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants