currentPendingAsModeratorEntries property
List<ModeratorEntry>
currentPendingAsModeratorEntries
Implementation
List<ModeratorEntry> get currentPendingAsModeratorEntries {
List<ModeratorEntry> _l = [];
for (OutgoingMessage i in currentPending) {
//skip non post reply
if (i.type != 0 && i.type != 1) continue;
Uint8List _body = utf8.encode(i.text) as Uint8List;
Uint8List _sl = Uint8List(0);
int bl = 0;
int pp = 0;
int keyHint = i.timestamp;
String colour = '';
Uint8List _xx = utf8.encode(i.xxHash) as Uint8List;
Uint8List _atl = Uint8List(8)
..buffer.asByteData().setInt64(0, i.attachementLength, Endian.big);
Uint8List attachmentLink = Uint8List(16);
int sds = 0;
for (var i in _atl) {
attachmentLink[sds++] = i;
}
for (var i in HEX.decode(i.xxHash)) {
attachmentLink[sds++] = i;
}
//Uint8List attachmentLink = Uint8List(8)
// ..buffer.asByteData().setInt64(0, i.xxHash, Endian.big);
Uint8List _eflags = Uint8List(2);
ModeratorEntryFlags flags = ModeratorEntryFlags(_eflags);
flags.moderate = true;
flags.attachements = i.hasAttachment;
if (i.type == 0) flags.isPost = true;
if (i.type == 1) flags.isReply = true;
//keyhint -1 filter out pending on ui level
final me = ModeratorEntry(
i.type,
i.nick,
_body,
_sl,
keyHint,
bl,
pp,
colour,
i.avatar,
i.nick,
attachmentLink,
flags,
i.timestamp,
0,
0,
0,
0);
me.isPending = true;
_l.add(me);
}
_currentPendingAsModeratorEntries = _l;
return _l;
}