{"action":"created","issue":{"url":"https://api.github.com/repos/Antidote-for-Tox/Antidote/issues/43","labels_url":"https://api.github.com/repos/Antidote-for-Tox/Antidote/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/Antidote-for-Tox/Antidote/issues/43/comments","events_url":"https://api.github.com/repos/Antidote-for-Tox/Antidote/issues/43/events","html_url":"https://github.com/Antidote-for-Tox/Antidote/pull/43","id":94199771,"number":43,"title":"WIP multipleCallHandling","user":{"login":"Chuongv","id":5170710,"avatar_url":"https://avatars.githubusercontent.com/u/5170710?v=3","gravatar_id":"","url":"https://api.github.com/users/Chuongv","html_url":"https://github.com/Chuongv","followers_url":"https://api.github.com/users/Chuongv/followers","following_url":"https://api.github.com/users/Chuongv/following{/other_user}","gists_url":"https://api.github.com/users/Chuongv/gists{/gist_id}","starred_url":"https://api.github.com/users/Chuongv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chuongv/subscriptions","organizations_url":"https://api.github.com/users/Chuongv/orgs","repos_url":"https://api.github.com/users/Chuongv/repos","events_url":"https://api.github.com/users/Chuongv/events{/privacy}","received_events_url":"https://api.github.com/users/Chuongv/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-10T02:46:24Z","updated_at":"2015-07-13T12:57:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Antidote-for-Tox/Antidote/pulls/43","html_url":"https://github.com/Antidote-for-Tox/Antidote/pull/43","diff_url":"https://github.com/Antidote-for-Tox/Antidote/pull/43.diff","patch_url":"https://github.com/Antidote-for-Tox/Antidote/pull/43.patch"},"body":"Merely just a work in progress, but I want to make sure I have the right architecture before I invest any further. No need to merge yet.\r\n\r\nThe whole idea is to have the `CallNavigationViewController` handle all the business of moving all the `AbstractCallViewControllers` including notifying any incoming calls.\r\n\r\nComments, suggestions or critiques appreciated :smile: "},"comment":{"url":"https://api.github.com/repos/Antidote-for-Tox/Antidote/issues/comments/120919549","html_url":"https://github.com/Antidote-for-Tox/Antidote/pull/43#issuecomment-120919549","issue_url":"https://api.github.com/repos/Antidote-for-Tox/Antidote/issues/43","id":120919549,"user":{"login":"dvor","id":1132979,"avatar_url":"https://avatars.githubusercontent.com/u/1132979?v=3","gravatar_id":"","url":"https://api.github.com/users/dvor","html_url":"https://github.com/dvor","followers_url":"https://api.github.com/users/dvor/followers","following_url":"https://api.github.com/users/dvor/following{/other_user}","gists_url":"https://api.github.com/users/dvor/gists{/gist_id}","starred_url":"https://api.github.com/users/dvor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvor/subscriptions","organizations_url":"https://api.github.com/users/dvor/orgs","repos_url":"https://api.github.com/users/dvor/repos","events_url":"https://api.github.com/users/dvor/events{/privacy}","received_events_url":"https://api.github.com/users/dvor/received_events","type":"User","site_admin":false},"created_at":"2015-07-13T12:57:10Z","updated_at":"2015-07-13T12:57:10Z","body":"This look quite good.\r\n\r\nHowever I think that even better it would be to move all logic out of controllers. You can create CallsManager:\r\n- it will be property of AppContext and be lazy initialized\r\n- it will have two methods\r\n  - callToChat:\r\n  - handleIncomingCall:\r\n- from ChatViewController you will call first method, from ToxListener the second one\r\n- ChatVC and ToxListener doesn't care if there is no call, there is active call or something else\r\n- CallsManager will manage all calls\r\n- CallsManager will present/dismiss push/pop controllers\r\n- controllers will know nothing about current call state. They\r\n  - will just have set of properties to show (like callerName, callDurationString, etc.). These properties will be set and updated by CallsManager\r\n  - will have a delegate (set to CallsManager) and send a messages to it like \"Dismiss button has been pressed\", etc.\r\n- when last call will end CallsManager can tell AppContext to kill itself ([[AppContext sharedContext] killCallsManager]).\r\n\r\nIf you have any other ideas we can discuss them. :-)"}}