{"action":"created","issue":{"url":"https://api.github.com/repos/QuantumBadger/RedReader/issues/694","repository_url":"https://api.github.com/repos/QuantumBadger/RedReader","labels_url":"https://api.github.com/repos/QuantumBadger/RedReader/issues/694/labels{/name}","comments_url":"https://api.github.com/repos/QuantumBadger/RedReader/issues/694/comments","events_url":"https://api.github.com/repos/QuantumBadger/RedReader/issues/694/events","html_url":"https://github.com/QuantumBadger/RedReader/pull/694","id":538583994,"node_id":"MDExOlB1bGxSZXF1ZXN0MzUzNzA0NTg2","number":694,"title":"added draft feature on posts","user":{"login":"fguibourt","id":44946638,"node_id":"MDQ6VXNlcjQ0OTQ2NjM4","avatar_url":"https://avatars1.githubusercontent.com/u/44946638?v=4","gravatar_id":"","url":"https://api.github.com/users/fguibourt","html_url":"https://github.com/fguibourt","followers_url":"https://api.github.com/users/fguibourt/followers","following_url":"https://api.github.com/users/fguibourt/following{/other_user}","gists_url":"https://api.github.com/users/fguibourt/gists{/gist_id}","starred_url":"https://api.github.com/users/fguibourt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fguibourt/subscriptions","organizations_url":"https://api.github.com/users/fguibourt/orgs","repos_url":"https://api.github.com/users/fguibourt/repos","events_url":"https://api.github.com/users/fguibourt/events{/privacy}","received_events_url":"https://api.github.com/users/fguibourt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2019-12-16T18:39:29Z","updated_at":"2019-12-17T17:23:53Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/QuantumBadger/RedReader/pulls/694","html_url":"https://github.com/QuantumBadger/RedReader/pull/694","diff_url":"https://github.com/QuantumBadger/RedReader/pull/694.diff","patch_url":"https://github.com/QuantumBadger/RedReader/pull/694.patch"},"body":"**Draft feature for postsubmit. Fixes #557**\r\nThis feature makes it possible to save a draft for a post with static variables.\r\nThe changes are in PostSubmitActivity.java. There are mainly based on the draft functionnality in CommentReplyActivity.java.\r\nThe fields stored with static variables are :\r\n\r\n- type of post (String)\r\n- post subreddit (String)\r\n- post title (String)\r\n- post content (String)\r\n- if the replies should be sent to inbox (boolean)\r\n- if the post is NSFW (boolean)\r\n- if the post is spoiler (boolean)\r\n\r\n**Before :** when a user wrote a post on a subreddit, this post was lost if the user went back to the subreddit page or to another page.\r\n\r\n**Benefits :** when a user writes a post on a subreddit, this post is saved for the current subreddit. If the user go to another page, he can get its post back when he hits \"Submit Post\" on the same subreddit page.\r\n\r\n**Limits :**\r\n\r\n- If the user goes to another subreddit and hits \"Submit Post\", then the draft of the previous subreddit is lost.\r\n- If the user quits the application, then the draft is lost.\r\n\r\n**Next :**\r\n\r\n- Maybe we could use a data class instead of static variables. Using the subreddit as a key, we could save a draft for each subreddit.\r\n- Maybe suggesting draft saving as an option to the user. Indeed, saving drafts automatically can be annoying for some users.\r\n- Use persistence to store the drafts even if the user quits the application."},"comment":{"url":"https://api.github.com/repos/QuantumBadger/RedReader/issues/comments/566663333","html_url":"https://github.com/QuantumBadger/RedReader/pull/694#issuecomment-566663333","issue_url":"https://api.github.com/repos/QuantumBadger/RedReader/issues/694","id":566663333,"node_id":"MDEyOklzc3VlQ29tbWVudDU2NjY2MzMzMw==","user":{"login":"QuantumBadger","id":2998158,"node_id":"MDQ6VXNlcjI5OTgxNTg=","avatar_url":"https://avatars0.githubusercontent.com/u/2998158?v=4","gravatar_id":"","url":"https://api.github.com/users/QuantumBadger","html_url":"https://github.com/QuantumBadger","followers_url":"https://api.github.com/users/QuantumBadger/followers","following_url":"https://api.github.com/users/QuantumBadger/following{/other_user}","gists_url":"https://api.github.com/users/QuantumBadger/gists{/gist_id}","starred_url":"https://api.github.com/users/QuantumBadger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuantumBadger/subscriptions","organizations_url":"https://api.github.com/users/QuantumBadger/orgs","repos_url":"https://api.github.com/users/QuantumBadger/repos","events_url":"https://api.github.com/users/QuantumBadger/events{/privacy}","received_events_url":"https://api.github.com/users/QuantumBadger/received_events","type":"User","site_admin":false},"created_at":"2019-12-17T17:23:53Z","updated_at":"2019-12-17T17:23:53Z","author_association":"OWNER","body":"Thanks, this looks good! One minor comment before I merge, it might be worth removing the \"Draft saved\" toast for now, as users might think it is saved to disk when actually it's just in RAM :)"}}
{"actor":{"display_login":"QuantumBadger"}}