@sendbird/calls-react-native
Version:
Sendbird Calls SDK for React Native: Empower React Native apps with seamless audio, video, and group calling. Build interactive communication easily.
34 lines • 1.42 kB
JavaScript
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
export class BridgedQuery {
get isLoading() {
return this._isLoading;
}
get hasNext() {
return this._hasNext;
}
constructor(queryKey, type, binder) {
this.queryKey = queryKey;
this.type = type;
this.binder = binder;
_defineProperty(this, "_isLoading", false);
_defineProperty(this, "_hasNext", false);
}
async next() {
this._isLoading = true;
const {
hasNext,
result
} = await this.binder.nativeModule.queryNext(this.queryKey, this.type);
this._hasNext = hasNext;
this._isLoading = false;
return result;
}
release() {
this.binder.nativeModule.queryRelease(this.queryKey);
}
}
export class DirectCallLogListQuery extends BridgedQuery {}
export class RoomListQuery extends BridgedQuery {}
//# sourceMappingURL=BridgedQuery.js.map