v 4.0.1
This commit is contained in:
parent
0aec835d8a
commit
d2b16244bf
|
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "chrome",
|
||||
"request": "launch",
|
||||
"name": "Launch Chrome against localhost",
|
||||
"url": "http://localhost:8080",
|
||||
"webRoot": "${workspaceFolder}"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -159,24 +159,24 @@ class DateTimeUtils {
|
|||
double interval = seconds / 31536000;
|
||||
|
||||
if (interval > 1) {
|
||||
return "منتشر شده در ${interval.floor()} سال پیش";
|
||||
return "در ${interval.floor()} سال پیش";
|
||||
}
|
||||
interval = seconds / 2592000;
|
||||
if (interval > 1) {
|
||||
return "منتشر شده در ${interval.floor()} ماه پیش";
|
||||
return "در ${interval.floor()} ماه پیش";
|
||||
}
|
||||
interval = seconds / 86400;
|
||||
if (interval > 1) {
|
||||
if (interval.floor() == 1) return 'دیروز';
|
||||
return "منتشر شده در ${interval.floor()} روز پیش";
|
||||
return "در ${interval.floor()} روز پیش";
|
||||
}
|
||||
interval = seconds / 3600;
|
||||
if (interval > 1) {
|
||||
return "منتشر شده در ${interval.floor()} ساعت پیش";
|
||||
return "در ${interval.floor()} ساعت پیش";
|
||||
}
|
||||
interval = seconds / 60;
|
||||
if (interval > 1) {
|
||||
return "منتشر شده در ${interval.floor()} دقیقه پیش";
|
||||
return "در ${interval.floor()} دقیقه پیش";
|
||||
}
|
||||
return 'هم اکنون';
|
||||
// return seconds.floor().toString() + " ثانیه پیش";
|
||||
|
|
|
|||
|
|
@ -152,10 +152,9 @@ class _HomeState extends State<Home>
|
|||
_tabController = TabController(length: 4, vsync: this, initialIndex: 0);
|
||||
state.tabController = _tabController;
|
||||
|
||||
// این قسمت را اضافه یا جایگزین کنید
|
||||
_tabController.addListener(() {
|
||||
state.currentPageIndex = _tabController.index;
|
||||
if (_tabController.index == 2) {
|
||||
if (_tabController.index == 3) { // Changed from 2 to 3 for Houshan tab
|
||||
// با هر بار ورود به تب هوشان، لیست چتها ریست میشود
|
||||
final historyState = context.read<HistoryAiChatState>();
|
||||
historyState.chats.clear();
|
||||
|
|
@ -184,9 +183,9 @@ class _HomeState extends State<Home>
|
|||
}
|
||||
|
||||
PreferredSizeWidget getAppBar() {
|
||||
PreferredSizeWidget result = const LogoAppBar();
|
||||
if (context.watch<HomeState>().tabController.index == 2) {
|
||||
result = HoshanAppBar(
|
||||
// Show HoshanAppBar only for AI section (index 3)
|
||||
if (context.watch<HomeState>().tabController.index == 3) {
|
||||
return HoshanAppBar(
|
||||
onBack: () {
|
||||
final state = context.read<AiState>();
|
||||
if (state.page == 1) {
|
||||
|
|
@ -195,8 +194,8 @@ class _HomeState extends State<Home>
|
|||
},
|
||||
);
|
||||
}
|
||||
|
||||
return result;
|
||||
// For all other tabs (home, categories, statistics), show LogoAppBar
|
||||
return const LogoAppBar();
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
@ -229,7 +228,7 @@ class _HomeState extends State<Home>
|
|||
confrimTitle: 'بله',
|
||||
dismissTitle: 'خیر',
|
||||
));
|
||||
} else if (context.read<HomeState>().tabController.index == 2) {
|
||||
} else if (context.read<HomeState>().tabController.index == 3) { // Changed from 2 to 3
|
||||
switch (context.read<AiState>().page) {
|
||||
case 1:
|
||||
context.read<AiState>().goToAi();
|
||||
|
|
@ -259,6 +258,7 @@ class _HomeState extends State<Home>
|
|||
MainPage(),
|
||||
CategoriesPage(),
|
||||
NewStatistic(),
|
||||
// AiSection(),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -47,7 +47,8 @@ class _NewStatisticState extends State<NewStatistic> {
|
|||
children: [
|
||||
Center(
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 16),
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 12, vertical: 16),
|
||||
color: Theme.of(context).colorScheme.background,
|
||||
child: DidvanText(
|
||||
'دستهبندیهای کلان',
|
||||
|
|
@ -97,7 +98,8 @@ class _NewStatisticState extends State<NewStatistic> {
|
|||
itemsInStatics(context, state, 1, DidvanIcons.currency_solid),
|
||||
itemsInStatics(context, state, 2, DidvanIcons.bitcoin_solid),
|
||||
itemsInStatics(context, state, 3, DidvanIcons.metal_solid),
|
||||
itemsInStatics(context, state, 4, DidvanIcons.commodity_solid),
|
||||
itemsInStatics(
|
||||
context, state, 4, DidvanIcons.commodity_solid),
|
||||
itemsInStatics(context, state, 5, DidvanIcons.industry_solid,
|
||||
hasDivider: false),
|
||||
const SizedBox(
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
|
|||
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
||||
# Read more about iOS versioning at
|
||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
version: 4.0.3+5000
|
||||
version: 4.0.1+6000
|
||||
|
||||
environment:
|
||||
sdk: ">=2.19.0 <3.0.0"
|
||||
|
|
|
|||
Loading…
Reference in New Issue