Implement Rich Quoting/Replies
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
4f58b92a14
commit
0f85391587
8 changed files with 405 additions and 98 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
Copyright 2017 Vector Creations Ltd
|
||||
Copyright 2017 New Vector Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -41,6 +42,8 @@ const INITIAL_STATE = {
|
|||
roomLoadError: null,
|
||||
|
||||
forwardingEvent: null,
|
||||
|
||||
quotingEvent: null,
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -108,6 +111,10 @@ class RoomViewStore extends Store {
|
|||
forwardingEvent: payload.event,
|
||||
});
|
||||
break;
|
||||
case 'quote_event':
|
||||
this._setState({
|
||||
quotingEvent: payload.event,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -286,6 +293,11 @@ class RoomViewStore extends Store {
|
|||
return this._state.forwardingEvent;
|
||||
}
|
||||
|
||||
// The mxEvent if one is currently being replied to/quoted
|
||||
getQuotingEvent() {
|
||||
return this._state.quotingEvent;
|
||||
}
|
||||
|
||||
shouldPeek() {
|
||||
return this._state.shouldPeek;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue