Add modlog entries for community transfers
This commit is contained in:
parent
0d2d9145ad
commit
ff44bbf7f9
|
@ -343,6 +343,25 @@ class _ModlogTable extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
),
|
||||
for (final transferredToCommunity in modlog.transferredToCommunity)
|
||||
_ModlogEntry.fromModTransferCommunityView(
|
||||
transferredToCommunity,
|
||||
RichText(
|
||||
text: TextSpan(
|
||||
children: [
|
||||
if (transferredToCommunity.modTransferCommunity.removed ??
|
||||
false)
|
||||
const TextSpan(text: 'removed ')
|
||||
else
|
||||
const TextSpan(text: 'transferred '),
|
||||
community(transferredToCommunity.community),
|
||||
const TextSpan(text: ' to '),
|
||||
user(transferredToCommunity.moddedPerson),
|
||||
],
|
||||
style: TextStyle(color: theme.colorScheme.onSurface),
|
||||
),
|
||||
),
|
||||
),
|
||||
for (final added in modlog.added)
|
||||
_ModlogEntry.fromModAddView(
|
||||
added,
|
||||
|
@ -482,6 +501,15 @@ class _ModlogEntry {
|
|||
action: action,
|
||||
);
|
||||
|
||||
_ModlogEntry.fromModTransferCommunityView(
|
||||
ModTransferCommunityView transferCommunity,
|
||||
Widget action,
|
||||
) : this(
|
||||
when: transferCommunity.modTransferCommunity.when,
|
||||
mod: transferCommunity.moderator,
|
||||
action: action,
|
||||
);
|
||||
|
||||
_ModlogEntry.fromModAddView(
|
||||
ModAddView added,
|
||||
Widget action,
|
||||
|
|
Loading…
Reference in New Issue