widget for showing pinned messages (wip)

This commit is contained in:
or-else
2023-03-23 18:09:11 -07:00
parent 11fe81fdf1
commit 71ee3fbec4
26 changed files with 334 additions and 175 deletions
+3 -3
View File
@@ -44,7 +44,7 @@ export default class ChipInput extends React.Component {
static indexChips(chips) {
const index = {};
let count = 0;
chips.map((item) => {
chips.forEach(item => {
index[item.user] = count;
count ++;
});
@@ -55,7 +55,7 @@ export default class ChipInput extends React.Component {
static sortChips(chips, keep) {
const required = [];
const normal = [];
chips.map((item) => {
chips.forEach(item => {
if (keep && keep.includes(item.user)) {
required.push(item);
} else {
@@ -115,7 +115,7 @@ export default class ChipInput extends React.Component {
const chips = [];
let count = 0;
const staticMembers = this.props.staticMembers || [];
this.state.sortedChips.map((item) => {
this.state.sortedChips.forEach(item => {
chips.push(
<Chip
tinode={this.props.tinode}