diff --git a/lib/models/irc.dart b/lib/models/irc.dart index 7d73af40..7326e1b0 100644 --- a/lib/models/irc.dart +++ b/lib/models/irc.dart @@ -663,6 +663,7 @@ class IRCMessage { bool showMessage = true, Map? channelIdToUserTwitch, TimestampType timestamp = TimestampType.disabled, + bool forceTimestamp = false, String? currentChannelId, }) { final emoteToObject = assetsStore.emoteToObject; @@ -677,7 +678,7 @@ class IRCMessage { // device's locale preference when the user has timestamps disabled. final isHistorical = tags['historical'] == '1'; final effectiveTimestamp = - (timestamp == TimestampType.disabled && isHistorical) + (timestamp == TimestampType.disabled && (isHistorical || forceTimestamp)) ? (MediaQuery.alwaysUse24HourFormatOf(context) ? TimestampType.twentyFour : TimestampType.twelve) diff --git a/lib/screens/channel/chat/widgets/chat_message.dart b/lib/screens/channel/chat/widgets/chat_message.dart index 8beb8008..2ff857c4 100644 --- a/lib/screens/channel/chat/widgets/chat_message.dart +++ b/lib/screens/channel/chat/widgets/chat_message.dart @@ -17,6 +17,7 @@ class ChatMessage extends StatelessWidget { final IRCMessage ircMessage; final ChatStore chatStore; final bool isModal; + final bool forceTimestamp; final bool showReplyHeader; final bool isInReplyThread; @@ -39,6 +40,7 @@ class ChatMessage extends StatelessWidget { required this.ircMessage, required this.chatStore, this.isModal = false, + this.forceTimestamp = false, this.showReplyHeader = true, this.isInReplyThread = false, this.overrideChannelIdToUserTwitch, @@ -126,6 +128,7 @@ class ChatMessage extends StatelessWidget { badgeScale: chatStore.settings.badgeScale, launchExternal: chatStore.settings.launchUrlExternal, timestamp: chatStore.settings.timestampType, + forceTimestamp: forceTimestamp, channelIdToUserTwitch: overrideChannelIdToUserTwitch ?? chatStore.assetsStore.channelIdToUserTwitch, currentChannelId: @@ -234,6 +237,7 @@ class ChatMessage extends StatelessWidget { badgeScale: chatStore.settings.badgeScale, launchExternal: chatStore.settings.launchUrlExternal, timestamp: chatStore.settings.timestampType, + forceTimestamp: forceTimestamp, channelIdToUserTwitch: overrideChannelIdToUserTwitch ?? chatStore.assetsStore.channelIdToUserTwitch, currentChannelId: @@ -389,6 +393,7 @@ class ChatMessage extends StatelessWidget { }, launchExternal: chatStore.settings.launchUrlExternal, timestamp: chatStore.settings.timestampType, + forceTimestamp: forceTimestamp, channelIdToUserTwitch: overrideChannelIdToUserTwitch ?? chatStore.assetsStore.channelIdToUserTwitch, @@ -518,6 +523,7 @@ class ChatMessage extends StatelessWidget { badgeScale: chatStore.settings.badgeScale, launchExternal: chatStore.settings.launchUrlExternal, timestamp: chatStore.settings.timestampType, + forceTimestamp: forceTimestamp, channelIdToUserTwitch: overrideChannelIdToUserTwitch ?? chatStore.assetsStore.channelIdToUserTwitch, diff --git a/lib/screens/channel/chat/widgets/chat_user_modal.dart b/lib/screens/channel/chat/widgets/chat_user_modal.dart index 2e0700ae..251c721f 100644 --- a/lib/screens/channel/chat/widgets/chat_user_modal.dart +++ b/lib/screens/channel/chat/widgets/chat_user_modal.dart @@ -115,6 +115,7 @@ class _ChatUserModalState extends State { ircMessage: userMessages[index], chatStore: widget.chatStore, isModal: true, + forceTimestamp: true, ), ), ),