{"action":"closed","number":151,"pull_request":{"url":"https://api.github.com/repos/pajato/GameChat/pulls/151","id":98642602,"html_url":"https://github.com/pajato/GameChat/pull/151","diff_url":"https://github.com/pajato/GameChat/pull/151.diff","patch_url":"https://github.com/pajato/GameChat/pull/151.patch","issue_url":"https://api.github.com/repos/pajato/GameChat/issues/151","number":151,"state":"closed","locked":false,"title":"Canonicalize the toolbars used in chat fragments.","user":{"login":"pajatopmr","id":2983697,"avatar_url":"https://avatars.githubusercontent.com/u/2983697?v=3","gravatar_id":"","url":"https://api.github.com/users/pajatopmr","html_url":"https://github.com/pajatopmr","followers_url":"https://api.github.com/users/pajatopmr/followers","following_url":"https://api.github.com/users/pajatopmr/following{/other_user}","gists_url":"https://api.github.com/users/pajatopmr/gists{/gist_id}","starred_url":"https://api.github.com/users/pajatopmr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pajatopmr/subscriptions","organizations_url":"https://api.github.com/users/pajatopmr/orgs","repos_url":"https://api.github.com/users/pajatopmr/repos","events_url":"https://api.github.com/users/pajatopmr/events{/privacy}","received_events_url":"https://api.github.com/users/pajatopmr/received_events","type":"User","site_admin":false},"body":"<h1>Rationale:</h1>\r\n\r\nWith the advent of a toolbar per fragment, it has become important to make sure that each toolbar uses a similar format and behavior.  This commit provides exactly such canonical treatment for toolbars.\r\n\r\nThis commit also replace the AddGroupActivity class with CreateGroupFragment, consolidating code for creating rooms or groups.\r\n\r\n<h1>File changes:</h1>\r\n\r\nmodified:   app/src/androidTest/java/com/pajato/android/gamechat/chat/AddGroupActivityTest.java\r\n\r\n- Replace the \"learn more\" overflow menu entry with \"Settings\".\r\n\r\nnew file:   app/src/androidTest/java/com/pajato/android/gamechat/chat/BaseChatFragmentTest.java\r\n\r\n- Create a placeholder to put testing for this commit.\r\n\r\nmodified:   app/src/main/java/com/pajato/android/gamechat/chat/AddGroupActivity.java\r\n\r\n- onClick(): update the menu handler to key off the renamed resources.\r\n\r\nmodified:   app/src/main/java/com/pajato/android/gamechat/chat/BaseChatFragment.java\r\n\r\n- initToolbar(): validate the item list type right at the top; simplify and canonicalize by using parameterized enum constants.\r\n- setTitles(): simplify by consolidating cases and procedural abstractions; remove the abstract overload implementation.\r\n- setTitle(), setTitleAndSubtitle(): remove after consolidating with setTitles().\r\n- ExitHandler(): remove, UpHandler suffices.\r\n\r\nmodified:   app/src/main/java/com/pajato/android/gamechat/chat/ChatFragment.java\r\n\r\n- CHAT_HOME_FAM_KEY, onClick(), getHomeMenu(): remove and put this functionality where it is used.\r\n- onAuthenticationChange(): simplify (minor).\r\n- onInitialize(): do not initialize the FAM.\r\n\r\nmodified:   app/src/main/java/com/pajato/android/gamechat/chat/ChatFragmentType.java\r\n\r\n- createGroup: new constant (to obolete AddGroupActivity).\r\n\r\nmodified:   app/src/main/java/com/pajato/android/gamechat/chat/ShowGroupListFragment.java\r\n\r\n- CHAT_GROUP_FAM_KEY, onClick(), getGroupMenu(), onInitialize(): add support for the group list view FAM.\r\n\r\nmodified:   app/src/main/java/com/pajato/android/gamechat/chat/ShowNoMessagesFragment.java\r\nmodified:   app/src/main/java/com/pajato/android/gamechat/chat/ShowOfflineFragment.java\r\n\r\n- onResume(): remove to no longer use the FAM.\r\n\r\nmodified:   app/src/main/java/com/pajato/android/gamechat/chat/ShowRoomListFragment.java\r\n\r\n- CHAT_ROOM_FAM_KEY, onClick(), getRoomMenu(): add support for the room list view FAM.\r\n\r\nnew file:   app/src/main/java/com/pajato/android/gamechat/chat/fragment/BaseCreateFragment.java\r\nnew file:   app/src/main/java/com/pajato/android/gamechat/chat/fragment/CreateGroupFragment.java\r\n\r\n- Summary: support for consolidated room and group creation.\r\n\r\nmodified:   app/src/main/java/com/pajato/android/gamechat/chat/fragment/CreateRoomFragment.java\r\n\r\n- CreateRoomFragment: base off the BaseCreateFragment class.\r\n- mGroup, mMember: new variables supporting fail-fast validation.\r\n- onClick(): handle the private/public choice.\r\n- onInitialize(): do the fail-fast validation.\r\n- onResume(): setup the list and toolbar.\r\n- save(): new method to perform the save operation.\r\n- setName(): new method used to set the default name.\r\n\r\nmodified:   app/src/main/java/com/pajato/android/gamechat/common/BaseFragment.java\r\n\r\n- setTitles(): remove the abstract coverload declaration.\r\n\r\nmodified:   app/src/main/java/com/pajato/android/gamechat/database/DBUtils.java\r\n\r\n- ChatListType: flesh out to support canonical toolbars.\r\n\r\nmodified:   app/src/main/java/com/pajato/android/gamechat/database/GroupManager.java\r\n\r\n- updateGroupProfile(): new method supporting canonical updates.\r\n\r\nmodified:   app/src/main/java/com/pajato/android/gamechat/database/MemberManager.java\r\n\r\n- createMember(), updateMember(): support canonical operations.\r\n\r\ndeleted:    app/src/main/java/com/pajato/android/gamechat/event/BackPressEvent.java\r\n\r\n- Summary: made obsolete in the canonicalized toolbar support.\r\n\r\nmodified:   app/src/main/java/com/pajato/android/gamechat/exp/BaseGameFragment.java\r\n\r\n- setTitles(): make concrete (for now).\r\n\r\nmodified:   app/src/main/java/com/pajato/android/gamechat/main/MainActivity.java\r\n\r\n- onBackPressed(): do not post this to the app but rather handle it directly.\r\n\r\nmodified:   app/src/main/java/com/pajato/android/gamechat/main/NavigationManager.java\r\n\r\n- closeDrawerIfOpen(): make public in order to simplify back press handling.\r\n\r\nnew file:   app/src/main/res/drawable/ic_more_vert_black_24dp.xml\r\n\r\n- Summary: new icon supporting canonical toolbars.\r\n\r\nmodified:   app/src/main/res/layout/activity_group_add.xml\r\n\r\n- Summary: fix compilation issues even though the file is doomed to be deleted shortly.\r\n\r\nrenamed:    app/src/main/res/layout/fragment_chat_create_room.xml -> app/src/main/res/layout/fragment_chat_create.xml\r\n\r\n- Summary: share across the two create operations.\r\n\r\nmodified:   app/src/main/res/layout/fragment_chat_join_rooms.xml\r\n\r\n- Summary: use neutral names.\r\n\r\nmodified:   app/src/main/res/menu/chat_menu_base.xml\r\nmodified:   app/src/main/res/menu/game_menu.xml\r\n\r\n- Summary: fix some cut/paster errors.\r\n\r\nrenamed:    app/src/main/res/menu/add_group_menu.xml -> app/src/main/res/menu/overflow_main_menu.xml\r\n\r\n- Better name.\r\n\r\nmodified:   app/src/main/res/values/strings_chat.xml\r\n\r\n- Summary: update to support the above changes.","created_at":"2016-12-19T21:25:49Z","updated_at":"2016-12-19T21:25:58Z","closed_at":"2016-12-19T21:25:58Z","merged_at":"2016-12-19T21:25:58Z","merge_commit_sha":"c957dbbcf49b293e909e11d6e7480b2cfc14c7c6","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/pajato/GameChat/pulls/151/commits","review_comments_url":"https://api.github.com/repos/pajato/GameChat/pulls/151/comments","review_comment_url":"https://api.github.com/repos/pajato/GameChat/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pajato/GameChat/issues/151/comments","statuses_url":"https://api.github.com/repos/pajato/GameChat/statuses/67838b4285c63b976488a1e38b7c344e089d2d3a","head":{"label":"pajato:canonicalize-toolbar","ref":"canonicalize-toolbar","sha":"67838b4285c63b976488a1e38b7c344e089d2d3a","user":{"login":"pajato","id":13346210,"avatar_url":"https://avatars.githubusercontent.com/u/13346210?v=3","gravatar_id":"","url":"https://api.github.com/users/pajato","html_url":"https://github.com/pajato","followers_url":"https://api.github.com/users/pajato/followers","following_url":"https://api.github.com/users/pajato/following{/other_user}","gists_url":"https://api.github.com/users/pajato/gists{/gist_id}","starred_url":"https://api.github.com/users/pajato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pajato/subscriptions","organizations_url":"https://api.github.com/users/pajato/orgs","repos_url":"https://api.github.com/users/pajato/repos","events_url":"https://api.github.com/users/pajato/events{/privacy}","received_events_url":"https://api.github.com/users/pajato/received_events","type":"Organization","site_admin":false},"repo":{"id":58804972,"name":"GameChat","full_name":"pajato/GameChat","owner":{"login":"pajato","id":13346210,"avatar_url":"https://avatars.githubusercontent.com/u/13346210?v=3","gravatar_id":"","url":"https://api.github.com/users/pajato","html_url":"https://github.com/pajato","followers_url":"https://api.github.com/users/pajato/followers","following_url":"https://api.github.com/users/pajato/following{/other_user}","gists_url":"https://api.github.com/users/pajato/gists{/gist_id}","starred_url":"https://api.github.com/users/pajato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pajato/subscriptions","organizations_url":"https://api.github.com/users/pajato/orgs","repos_url":"https://api.github.com/users/pajato/repos","events_url":"https://api.github.com/users/pajato/events{/privacy}","received_events_url":"https://api.github.com/users/pajato/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pajato/GameChat","description":"An Android app allowing gamers and gawkers to chat while playing and observing one or more games.","fork":false,"url":"https://api.github.com/repos/pajato/GameChat","forks_url":"https://api.github.com/repos/pajato/GameChat/forks","keys_url":"https://api.github.com/repos/pajato/GameChat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pajato/GameChat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pajato/GameChat/teams","hooks_url":"https://api.github.com/repos/pajato/GameChat/hooks","issue_events_url":"https://api.github.com/repos/pajato/GameChat/issues/events{/number}","events_url":"https://api.github.com/repos/pajato/GameChat/events","assignees_url":"https://api.github.com/repos/pajato/GameChat/assignees{/user}","branches_url":"https://api.github.com/repos/pajato/GameChat/branches{/branch}","tags_url":"https://api.github.com/repos/pajato/GameChat/tags","blobs_url":"https://api.github.com/repos/pajato/GameChat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pajato/GameChat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pajato/GameChat/git/refs{/sha}","trees_url":"https://api.github.com/repos/pajato/GameChat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pajato/GameChat/statuses/{sha}","languages_url":"https://api.github.com/repos/pajato/GameChat/languages","stargazers_url":"https://api.github.com/repos/pajato/GameChat/stargazers","contributors_url":"https://api.github.com/repos/pajato/GameChat/contributors","subscribers_url":"https://api.github.com/repos/pajato/GameChat/subscribers","subscription_url":"https://api.github.com/repos/pajato/GameChat/subscription","commits_url":"https://api.github.com/repos/pajato/GameChat/commits{/sha}","git_commits_url":"https://api.github.com/repos/pajato/GameChat/git/commits{/sha}","comments_url":"https://api.github.com/repos/pajato/GameChat/comments{/number}","issue_comment_url":"https://api.github.com/repos/pajato/GameChat/issues/comments{/number}","contents_url":"https://api.github.com/repos/pajato/GameChat/contents/{+path}","compare_url":"https://api.github.com/repos/pajato/GameChat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pajato/GameChat/merges","archive_url":"https://api.github.com/repos/pajato/GameChat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pajato/GameChat/downloads","issues_url":"https://api.github.com/repos/pajato/GameChat/issues{/number}","pulls_url":"https://api.github.com/repos/pajato/GameChat/pulls{/number}","milestones_url":"https://api.github.com/repos/pajato/GameChat/milestones{/number}","notifications_url":"https://api.github.com/repos/pajato/GameChat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pajato/GameChat/labels{/name}","releases_url":"https://api.github.com/repos/pajato/GameChat/releases{/id}","deployments_url":"https://api.github.com/repos/pajato/GameChat/deployments","created_at":"2016-05-14T11:42:49Z","updated_at":"2016-05-15T08:58:39Z","pushed_at":"2016-12-19T21:25:58Z","git_url":"git://github.com/pajato/GameChat.git","ssh_url":"git@github.com:pajato/GameChat.git","clone_url":"https://github.com/pajato/GameChat.git","svn_url":"https://github.com/pajato/GameChat","homepage":null,"size":3354,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"base":{"label":"pajato:master","ref":"master","sha":"48026170f01a6d725c1c50d3b5b69ef32256d90d","user":{"login":"pajato","id":13346210,"avatar_url":"https://avatars.githubusercontent.com/u/13346210?v=3","gravatar_id":"","url":"https://api.github.com/users/pajato","html_url":"https://github.com/pajato","followers_url":"https://api.github.com/users/pajato/followers","following_url":"https://api.github.com/users/pajato/following{/other_user}","gists_url":"https://api.github.com/users/pajato/gists{/gist_id}","starred_url":"https://api.github.com/users/pajato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pajato/subscriptions","organizations_url":"https://api.github.com/users/pajato/orgs","repos_url":"https://api.github.com/users/pajato/repos","events_url":"https://api.github.com/users/pajato/events{/privacy}","received_events_url":"https://api.github.com/users/pajato/received_events","type":"Organization","site_admin":false},"repo":{"id":58804972,"name":"GameChat","full_name":"pajato/GameChat","owner":{"login":"pajato","id":13346210,"avatar_url":"https://avatars.githubusercontent.com/u/13346210?v=3","gravatar_id":"","url":"https://api.github.com/users/pajato","html_url":"https://github.com/pajato","followers_url":"https://api.github.com/users/pajato/followers","following_url":"https://api.github.com/users/pajato/following{/other_user}","gists_url":"https://api.github.com/users/pajato/gists{/gist_id}","starred_url":"https://api.github.com/users/pajato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pajato/subscriptions","organizations_url":"https://api.github.com/users/pajato/orgs","repos_url":"https://api.github.com/users/pajato/repos","events_url":"https://api.github.com/users/pajato/events{/privacy}","received_events_url":"https://api.github.com/users/pajato/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pajato/GameChat","description":"An Android app allowing gamers and gawkers to chat while playing and observing one or more games.","fork":false,"url":"https://api.github.com/repos/pajato/GameChat","forks_url":"https://api.github.com/repos/pajato/GameChat/forks","keys_url":"https://api.github.com/repos/pajato/GameChat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pajato/GameChat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pajato/GameChat/teams","hooks_url":"https://api.github.com/repos/pajato/GameChat/hooks","issue_events_url":"https://api.github.com/repos/pajato/GameChat/issues/events{/number}","events_url":"https://api.github.com/repos/pajato/GameChat/events","assignees_url":"https://api.github.com/repos/pajato/GameChat/assignees{/user}","branches_url":"https://api.github.com/repos/pajato/GameChat/branches{/branch}","tags_url":"https://api.github.com/repos/pajato/GameChat/tags","blobs_url":"https://api.github.com/repos/pajato/GameChat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pajato/GameChat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pajato/GameChat/git/refs{/sha}","trees_url":"https://api.github.com/repos/pajato/GameChat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pajato/GameChat/statuses/{sha}","languages_url":"https://api.github.com/repos/pajato/GameChat/languages","stargazers_url":"https://api.github.com/repos/pajato/GameChat/stargazers","contributors_url":"https://api.github.com/repos/pajato/GameChat/contributors","subscribers_url":"https://api.github.com/repos/pajato/GameChat/subscribers","subscription_url":"https://api.github.com/repos/pajato/GameChat/subscription","commits_url":"https://api.github.com/repos/pajato/GameChat/commits{/sha}","git_commits_url":"https://api.github.com/repos/pajato/GameChat/git/commits{/sha}","comments_url":"https://api.github.com/repos/pajato/GameChat/comments{/number}","issue_comment_url":"https://api.github.com/repos/pajato/GameChat/issues/comments{/number}","contents_url":"https://api.github.com/repos/pajato/GameChat/contents/{+path}","compare_url":"https://api.github.com/repos/pajato/GameChat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pajato/GameChat/merges","archive_url":"https://api.github.com/repos/pajato/GameChat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pajato/GameChat/downloads","issues_url":"https://api.github.com/repos/pajato/GameChat/issues{/number}","pulls_url":"https://api.github.com/repos/pajato/GameChat/pulls{/number}","milestones_url":"https://api.github.com/repos/pajato/GameChat/milestones{/number}","notifications_url":"https://api.github.com/repos/pajato/GameChat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pajato/GameChat/labels{/name}","releases_url":"https://api.github.com/repos/pajato/GameChat/releases{/id}","deployments_url":"https://api.github.com/repos/pajato/GameChat/deployments","created_at":"2016-05-14T11:42:49Z","updated_at":"2016-05-15T08:58:39Z","pushed_at":"2016-12-19T21:25:58Z","git_url":"git://github.com/pajato/GameChat.git","ssh_url":"git@github.com:pajato/GameChat.git","clone_url":"https://github.com/pajato/GameChat.git","svn_url":"https://github.com/pajato/GameChat","homepage":null,"size":3354,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pajato/GameChat/pulls/151"},"html":{"href":"https://github.com/pajato/GameChat/pull/151"},"issue":{"href":"https://api.github.com/repos/pajato/GameChat/issues/151"},"comments":{"href":"https://api.github.com/repos/pajato/GameChat/issues/151/comments"},"review_comments":{"href":"https://api.github.com/repos/pajato/GameChat/pulls/151/comments"},"review_comment":{"href":"https://api.github.com/repos/pajato/GameChat/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pajato/GameChat/pulls/151/commits"},"statuses":{"href":"https://api.github.com/repos/pajato/GameChat/statuses/67838b4285c63b976488a1e38b7c344e089d2d3a"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"pajatopmr","id":2983697,"avatar_url":"https://avatars.githubusercontent.com/u/2983697?v=3","gravatar_id":"","url":"https://api.github.com/users/pajatopmr","html_url":"https://github.com/pajatopmr","followers_url":"https://api.github.com/users/pajatopmr/followers","following_url":"https://api.github.com/users/pajatopmr/following{/other_user}","gists_url":"https://api.github.com/users/pajatopmr/gists{/gist_id}","starred_url":"https://api.github.com/users/pajatopmr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pajatopmr/subscriptions","organizations_url":"https://api.github.com/users/pajatopmr/orgs","repos_url":"https://api.github.com/users/pajatopmr/repos","events_url":"https://api.github.com/users/pajatopmr/events{/privacy}","received_events_url":"https://api.github.com/users/pajatopmr/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":799,"deletions":265,"changed_files":29}}
{"actor":{"display_login":"pajatopmr"}}