def connect_api(self, api: RedditAPI):
        start_sub = None
        if start_sub is None:
            start_sub = get_settings()['default-sub']

        if self._api is not None:
            # TODO: swap right panel
            print('Swapping', self._api, 'for', api)

            start_sub = self._sublist.get_uri()
            # FIXME: do we need to disconnect the callbacks?
            self._sublist.destroy()
            self._subentry.destroy()

        self._api = api
        self._api.request_failed.connect(self.__request_failed_cb)

        self._sublist = SubList(self._api, start_sub)
        self._sublist.new_other_pane.connect(self.__new_other_pane_cb)
        self._sublist_bin.add(self._sublist)
        #self._paned.child_set_property(self._sublist, 'shrink', True)
        self._sublist.show()

        self._subentry = SubEntry(self._api, start_sub)
        self._subentry.activate.connect(self.__subentry_activate_cb)
        self._subentry.escape_me.connect(self.__subentry_escape_me_cb)
        self._left_header.props.custom_title = self._subentry
        self._subentry.show()