q(...) -> Promise.resolve
``` find src test -name '*.js' | xargs perl -i -pe 's/\b[qQ]\(/Promise.resolve(/' ```
This commit is contained in:
parent
10decf95f6
commit
b29b4a959b
6 changed files with 10 additions and 10 deletions
|
@ -57,7 +57,7 @@ ConferenceCall.prototype._joinConferenceUser = function() {
|
|||
}
|
||||
var member = groupRoom.getMember(this.confUserId);
|
||||
if (member && member.membership === "join") {
|
||||
return q();
|
||||
return Promise.resolve();
|
||||
}
|
||||
return this.client.invite(this.groupRoomId, this.confUserId);
|
||||
};
|
||||
|
@ -75,7 +75,7 @@ ConferenceCall.prototype._getConferenceUserRoom = function() {
|
|||
}
|
||||
}
|
||||
if (confRoom) {
|
||||
return q(confRoom);
|
||||
return Promise.resolve(confRoom);
|
||||
}
|
||||
return this.client.createRoom({
|
||||
preset: "private_chat",
|
||||
|
|
|
@ -117,7 +117,7 @@ module.exports = React.createClass({
|
|||
},
|
||||
|
||||
getMoreRooms: function() {
|
||||
if (!MatrixClientPeg.get()) return q();
|
||||
if (!MatrixClientPeg.get()) return Promise.resolve();
|
||||
|
||||
const my_filter_string = this.state.filterString;
|
||||
const my_server = this.state.roomServer;
|
||||
|
@ -266,7 +266,7 @@ module.exports = React.createClass({
|
|||
},
|
||||
|
||||
onFillRequest: function(backwards) {
|
||||
if (backwards || !this.nextBatch) return q(false);
|
||||
if (backwards || !this.nextBatch) return Promise.resolve(false);
|
||||
|
||||
return this.getMoreRooms();
|
||||
},
|
||||
|
|
|
@ -173,7 +173,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
|||
}
|
||||
|
||||
getAppVersion(): Promise<string> {
|
||||
return q(remote.app.getVersion());
|
||||
return Promise.resolve(remote.app.getVersion());
|
||||
}
|
||||
|
||||
startUpdateCheck() {
|
||||
|
@ -201,7 +201,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
|||
isElectron(): boolean { return true; }
|
||||
|
||||
requestNotificationPermission(): Promise<string> {
|
||||
return q('granted');
|
||||
return Promise.resolve('granted');
|
||||
}
|
||||
|
||||
reload() {
|
||||
|
|
|
@ -132,7 +132,7 @@ export default class WebPlatform extends VectorBasePlatform {
|
|||
|
||||
getAppVersion(): Promise<string> {
|
||||
if (this.runningVersion !== null) {
|
||||
return q(this.runningVersion);
|
||||
return Promise.resolve(this.runningVersion);
|
||||
}
|
||||
return this._getVersion();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue