{"action":"created","issue":{"url":"https://api.github.com/repos/hlamer/enki/issues/352","labels_url":"https://api.github.com/repos/hlamer/enki/issues/352/labels{/name}","comments_url":"https://api.github.com/repos/hlamer/enki/issues/352/comments","events_url":"https://api.github.com/repos/hlamer/enki/issues/352/events","html_url":"https://github.com/hlamer/enki/issues/352","id":118286004,"number":352,"title":"Preview is synced even if not visible","user":{"login":"hlamer","id":419720,"avatar_url":"https://avatars.githubusercontent.com/u/419720?v=3","gravatar_id":"","url":"https://api.github.com/users/hlamer","html_url":"https://github.com/hlamer","followers_url":"https://api.github.com/users/hlamer/followers","following_url":"https://api.github.com/users/hlamer/following{/other_user}","gists_url":"https://api.github.com/users/hlamer/gists{/gist_id}","starred_url":"https://api.github.com/users/hlamer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hlamer/subscriptions","organizations_url":"https://api.github.com/users/hlamer/orgs","repos_url":"https://api.github.com/users/hlamer/repos","events_url":"https://api.github.com/users/hlamer/events{/privacy}","received_events_url":"https://api.github.com/users/hlamer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hlamer/enki/labels/bug","name":"bug","color":"e10c02"}],"state":"open","locked":false,"assignee":{"login":"bjones1","id":2125584,"avatar_url":"https://avatars.githubusercontent.com/u/2125584?v=3","gravatar_id":"","url":"https://api.github.com/users/bjones1","html_url":"https://github.com/bjones1","followers_url":"https://api.github.com/users/bjones1/followers","following_url":"https://api.github.com/users/bjones1/following{/other_user}","gists_url":"https://api.github.com/users/bjones1/gists{/gist_id}","starred_url":"https://api.github.com/users/bjones1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjones1/subscriptions","organizations_url":"https://api.github.com/users/bjones1/orgs","repos_url":"https://api.github.com/users/bjones1/repos","events_url":"https://api.github.com/users/bjones1/events{/privacy}","received_events_url":"https://api.github.com/users/bjones1/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/hlamer/enki/milestones/12","html_url":"https://github.com/hlamer/enki/milestones/v15.11","labels_url":"https://api.github.com/repos/hlamer/enki/milestones/12/labels","id":1277151,"number":12,"title":"v15.11","description":"","creator":{"login":"hlamer","id":419720,"avatar_url":"https://avatars.githubusercontent.com/u/419720?v=3","gravatar_id":"","url":"https://api.github.com/users/hlamer","html_url":"https://github.com/hlamer","followers_url":"https://api.github.com/users/hlamer/followers","following_url":"https://api.github.com/users/hlamer/following{/other_user}","gists_url":"https://api.github.com/users/hlamer/gists{/gist_id}","starred_url":"https://api.github.com/users/hlamer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hlamer/subscriptions","organizations_url":"https://api.github.com/users/hlamer/orgs","repos_url":"https://api.github.com/users/hlamer/repos","events_url":"https://api.github.com/users/hlamer/events{/privacy}","received_events_url":"https://api.github.com/users/hlamer/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":14,"state":"open","created_at":"2015-08-28T07:55:51Z","updated_at":"2015-11-23T20:24:18Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-11-22T20:23:55Z","updated_at":"2015-11-23T22:46:02Z","closed_at":null,"body":"While debugging #351 I found that syncTextToPreview() is called and does its job even if Preview is not available for this type of file.\r\n\r\nSteps to reproduce:\r\n* Open some file which has preview. i.e. README.md\r\n* Switch to file which doesn't have preview. i.e. Makefile\r\n\r\nBryan, could you check this?\r\n\r\nIs it possible to split preview_sync.py onto 2 simler classes: TextToPreviewSync and PreviewToTextSync? Just an idea, I'm not sure if it is possible and if it makes sense."},"comment":{"url":"https://api.github.com/repos/hlamer/enki/issues/comments/159091833","html_url":"https://github.com/hlamer/enki/issues/352#issuecomment-159091833","issue_url":"https://api.github.com/repos/hlamer/enki/issues/352","id":159091833,"user":{"login":"bjones1","id":2125584,"avatar_url":"https://avatars.githubusercontent.com/u/2125584?v=3","gravatar_id":"","url":"https://api.github.com/users/bjones1","html_url":"https://github.com/bjones1","followers_url":"https://api.github.com/users/bjones1/followers","following_url":"https://api.github.com/users/bjones1/following{/other_user}","gists_url":"https://api.github.com/users/bjones1/gists{/gist_id}","starred_url":"https://api.github.com/users/bjones1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjones1/subscriptions","organizations_url":"https://api.github.com/users/bjones1/orgs","repos_url":"https://api.github.com/users/bjones1/repos","events_url":"https://api.github.com/users/bjones1/events{/privacy}","received_events_url":"https://api.github.com/users/bjones1/received_events","type":"User","site_admin":false},"created_at":"2015-11-23T22:46:01Z","updated_at":"2015-11-23T22:46:01Z","body":"OK, fixed. Thanks for finding this.\r\n\r\nIn terms of splitting `preview_sync.py`, that should work. However, I plan on adding features at some point, and will postpone it until then."}}