📝 Rename the currencies
This commit is contained in:
@@ -251,10 +251,10 @@
|
|||||||
"translatorBadgeName": "翻译者",
|
"translatorBadgeName": "翻译者",
|
||||||
"translatorBadgeDescription": "协助将 Solar Network 翻译成不同语言",
|
"translatorBadgeDescription": "协助将 Solar Network 翻译成不同语言",
|
||||||
"wallet": "钱包",
|
"wallet": "钱包",
|
||||||
"walletCurrencyPoints": "溯源点数",
|
"walletCurrencyPoints": "源能点",
|
||||||
"walletCurrencyShortPoints": "NSP",
|
"walletCurrencyShortPoints": "NSP",
|
||||||
"walletCurrencyGolds": "太阳币",
|
"walletCurrencyGolds": "星辰碎片",
|
||||||
"walletCurrencyShortGolds": "NSD",
|
"walletCurrencyShortGolds": "SHD",
|
||||||
"retry": "重试",
|
"retry": "重试",
|
||||||
"creatorHubUnselectedHint": "选择/创建一个发布者以开始使用。",
|
"creatorHubUnselectedHint": "选择/创建一个发布者以开始使用。",
|
||||||
"relationships": "关系",
|
"relationships": "关系",
|
||||||
|
|||||||
@@ -54,6 +54,17 @@ class ThoughtScreen extends HookConsumerWidget {
|
|||||||
? ref.watch(thoughtSequenceProvider(selectedSequenceId.value!))
|
? ref.watch(thoughtSequenceProvider(selectedSequenceId.value!))
|
||||||
: const AsyncValue<List<SnThinkingThought>>.data([]);
|
: const AsyncValue<List<SnThinkingThought>>.data([]);
|
||||||
|
|
||||||
|
// Extract sequence ID from loaded thoughts for the chat interface
|
||||||
|
final sequenceIdFromThoughts = thoughts.maybeWhen(
|
||||||
|
data: (thoughts) {
|
||||||
|
if (thoughts.isNotEmpty && thoughts.first.sequenceId.isNotEmpty) {
|
||||||
|
return thoughts.first.sequenceId;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
orElse: () => null,
|
||||||
|
);
|
||||||
|
|
||||||
// Get initial thoughts and topic from provider
|
// Get initial thoughts and topic from provider
|
||||||
final initialThoughts = thoughts.valueOrNull;
|
final initialThoughts = thoughts.valueOrNull;
|
||||||
final initialTopic =
|
final initialTopic =
|
||||||
@@ -111,6 +122,7 @@ class ThoughtScreen extends HookConsumerWidget {
|
|||||||
data:
|
data:
|
||||||
(thoughtList) => ThoughtChatInterface(
|
(thoughtList) => ThoughtChatInterface(
|
||||||
initialThoughts: thoughtList,
|
initialThoughts: thoughtList,
|
||||||
|
initialSequenceId: sequenceIdFromThoughts,
|
||||||
initialTopic: initialTopic,
|
initialTopic: initialTopic,
|
||||||
isDisabled: !status,
|
isDisabled: !status,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1863,6 +1863,6 @@ class WalletScreen extends HookConsumerWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const Map<String, IconData> kCurrencyIconData = {
|
const Map<String, IconData> kCurrencyIconData = {
|
||||||
'points': Symbols.toll,
|
'points': Symbols.bolt,
|
||||||
'golds': Symbols.attach_money,
|
'golds': Symbols.diamond,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -386,6 +386,7 @@ ThoughtChatState useThoughtChat(
|
|||||||
|
|
||||||
class ThoughtChatInterface extends HookConsumerWidget {
|
class ThoughtChatInterface extends HookConsumerWidget {
|
||||||
final List<SnThinkingThought>? initialThoughts;
|
final List<SnThinkingThought>? initialThoughts;
|
||||||
|
final String? initialSequenceId;
|
||||||
final String? initialTopic;
|
final String? initialTopic;
|
||||||
final List<Map<String, dynamic>> attachedMessages;
|
final List<Map<String, dynamic>> attachedMessages;
|
||||||
final List<String> attachedPosts;
|
final List<String> attachedPosts;
|
||||||
@@ -394,6 +395,7 @@ class ThoughtChatInterface extends HookConsumerWidget {
|
|||||||
const ThoughtChatInterface({
|
const ThoughtChatInterface({
|
||||||
super.key,
|
super.key,
|
||||||
this.initialThoughts,
|
this.initialThoughts,
|
||||||
|
this.initialSequenceId,
|
||||||
this.initialTopic,
|
this.initialTopic,
|
||||||
this.attachedMessages = const [],
|
this.attachedMessages = const [],
|
||||||
this.attachedPosts = const [],
|
this.attachedPosts = const [],
|
||||||
@@ -407,6 +409,7 @@ class ThoughtChatInterface extends HookConsumerWidget {
|
|||||||
|
|
||||||
final chatState = useThoughtChat(
|
final chatState = useThoughtChat(
|
||||||
ref,
|
ref,
|
||||||
|
initialSequenceId: initialSequenceId,
|
||||||
initialThoughts: initialThoughts,
|
initialThoughts: initialThoughts,
|
||||||
initialTopic: initialTopic,
|
initialTopic: initialTopic,
|
||||||
attachedMessages: attachedMessages,
|
attachedMessages: attachedMessages,
|
||||||
|
|||||||
Reference in New Issue
Block a user