stream-chat-react-native-core
Version:
The official React Native and Expo components for Stream Chat, a service for building chat applications
24 lines • 665 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.AttachmentPickerStore = void 0;
var _streamChat = require("stream-chat");
var INITIAL_STATE = {
selectedPicker: undefined
};
class AttachmentPickerStore {
state = new _streamChat.StateStore(INITIAL_STATE);
lastChanged = -1;
setSelectedPicker(value, debounceClose) {
var now = Date.now();
if (debounceClose && !value && now - this.lastChanged < 500) {
return;
}
this.lastChanged = now;
this.state.partialNext({
selectedPicker: value
});
}
}
exports.AttachmentPickerStore = AttachmentPickerStore;
//# sourceMappingURL=attachment-picker-store.js.map