Add javascript promise for disconnect in dolphin-platform-js #280

Closed
hendrikebbers opened this Issue Dec 1, 2016 · 6 comments

Projects

None yet

2 participants

@hendrikebbers
Member

The dolphin-polymer.js file has a disconnect-function.

ClientContext.prototype.disconnect = function () {
// TODO: Implement ClientContext.disconnect [DP-46]
var self = this;
this.dolphin.stopPushListening();
this._controllerManager.destroy().then(function () {
console.log('destroyed');
self._connector.invoke(DISCONNECT_COMMAND_NAME);
self.dolphin = null;
self.beanManager = null;
self._controllerManager = null;
self._connector = null;
});
};

To implement the logout mechanism properly in Icos we need to have that code executed in a promise so that we can react after the disconnection.

@hendrikebbers hendrikebbers added this to the 0.8.9 milestone Dec 1, 2016
@hendrikebbers hendrikebbers modified the milestone: 0.8.10, 0.8.9 Dec 16, 2016
@hendrikebbers hendrikebbers modified the milestone: 0.9.0, 0.8.10 Dec 29, 2016
@hendrikebbers hendrikebbers modified the milestone: 0.8.11, 0.9.0 Jan 13, 2017
@kunsingh
Contributor
kunsingh commented Jan 23, 2017 edited

There is no dolphin-polymer.js file in polymer project. We have dolphin-polymer-api.js, but here we don't have disconnect() method. We have disconnect method in clientcontext.js of 'dolphin-platform-js'.
I am suppose to add promise to 'dolphin-platform-js' -> clientcontext.js? right!

@hendrikebbers
Member

I think so. @kunsingh You did this, right? Can we close this issue?

@kunsingh
Contributor
kunsingh commented Jan 23, 2017 edited

NO....so this change is remaining.....I had asked you what to resolve. I found how to resolve without any value on js side. Only question is that- this change is suppose to be done in js project not in polymer ...right?

@hendrikebbers
Member

yes, I think you are right

@hendrikebbers hendrikebbers changed the title from Add javascript promise for disconnect in dolphin-polymer.js to Add javascript promise for disconnect in dolphin-platform-js Jan 23, 2017
@kunsingh
Contributor

ok...I will make the required changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment