{"action":"created","issue":{"url":"https://api.github.com/repos/thompsnm/ancprb/issues/1","labels_url":"https://api.github.com/repos/thompsnm/ancprb/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/thompsnm/ancprb/issues/1/comments","events_url":"https://api.github.com/repos/thompsnm/ancprb/issues/1/events","html_url":"https://github.com/thompsnm/ancprb/pull/1","id":105259662,"number":1,"title":"Graceful quit","user":{"login":"thompsnm","id":5762421,"avatar_url":"https://avatars.githubusercontent.com/u/5762421?v=3","gravatar_id":"","url":"https://api.github.com/users/thompsnm","html_url":"https://github.com/thompsnm","followers_url":"https://api.github.com/users/thompsnm/followers","following_url":"https://api.github.com/users/thompsnm/following{/other_user}","gists_url":"https://api.github.com/users/thompsnm/gists{/gist_id}","starred_url":"https://api.github.com/users/thompsnm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thompsnm/subscriptions","organizations_url":"https://api.github.com/users/thompsnm/orgs","repos_url":"https://api.github.com/users/thompsnm/repos","events_url":"https://api.github.com/users/thompsnm/events{/privacy}","received_events_url":"https://api.github.com/users/thompsnm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-07T19:22:45Z","updated_at":"2015-09-08T19:46:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/thompsnm/ancprb/pulls/1","html_url":"https://github.com/thompsnm/ancprb/pull/1","diff_url":"https://github.com/thompsnm/ancprb/pull/1.diff","patch_url":"https://github.com/thompsnm/ancprb/pull/1.patch"},"body":"This pull request would allow the user to gracefully quit both the Pebble app and Python companion app by pressing the \"Back\" button on their watch after reaching a game over screen. Currently, the only way to quit the companion app is to Ctrl+Z the process, which may leave an open connection to the watch. Such unattended connection may cause problems when later attempting to pair with it.\r\n\r\nNote: If such problems arise, they can be fixed by unpairing the watch from your computer's Bluetooth panel and cycling Bluetooth off and back on from your Pebble Time, then following the steps to pair the devices again as described in the Pebble README file."},"comment":{"url":"https://api.github.com/repos/thompsnm/ancprb/issues/comments/138680498","html_url":"https://github.com/thompsnm/ancprb/pull/1#issuecomment-138680498","issue_url":"https://api.github.com/repos/thompsnm/ancprb/issues/1","id":138680498,"user":{"login":"Sibicle","id":4299422,"avatar_url":"https://avatars.githubusercontent.com/u/4299422?v=3","gravatar_id":"","url":"https://api.github.com/users/Sibicle","html_url":"https://github.com/Sibicle","followers_url":"https://api.github.com/users/Sibicle/followers","following_url":"https://api.github.com/users/Sibicle/following{/other_user}","gists_url":"https://api.github.com/users/Sibicle/gists{/gist_id}","starred_url":"https://api.github.com/users/Sibicle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sibicle/subscriptions","organizations_url":"https://api.github.com/users/Sibicle/orgs","repos_url":"https://api.github.com/users/Sibicle/repos","events_url":"https://api.github.com/users/Sibicle/events{/privacy}","received_events_url":"https://api.github.com/users/Sibicle/received_events","type":"User","site_admin":false},"created_at":"2015-09-08T19:46:19Z","updated_at":"2015-09-08T19:46:19Z","body":"Yeah maybe we could make it so you have to press back once, then center to exit? At least while you are in game mode. \n\n\n\n> On Sep 8, 2015, at 13:12, Nathan Thompson <notifications@github.com> wrote:\n> \n> Good idea. I know Pebble reserves the long press on the back button to always be a force quit command, so we would just have to override the single press to be something else. Perhaps a single press would present a dialog saying something like \"To exit the LulzBlap, hold the back button for X seconds. Press any button to dismiss this message\". We could also make it so that the dialog doesn't interrupt the game controls in case the back button was pressed by accident.\n> \n> My only concern would be ensuring all memory is deallocated. I'm not sure what exactly happens if you exit an app using the long press method. Come to think of it, I'm not sure how window_stack_pop_all() (which I used in this changeset) behaves with regard to memory deallocation either. Further research is needed.\n> \n> —\n> Reply to this email directly or view it on GitHub.\n> \n"}}