put andriod custom client logo to settings section list (#7768)
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
e83c28bf54
commit
5d5547ffef
@ -26,8 +26,9 @@ class HomePageState extends State<HomePage> {
|
|||||||
var _selectedIndex = 0;
|
var _selectedIndex = 0;
|
||||||
int get selectedIndex => _selectedIndex;
|
int get selectedIndex => _selectedIndex;
|
||||||
final List<PageShape> _pages = [];
|
final List<PageShape> _pages = [];
|
||||||
|
int _chatPageTabIndex = -1;
|
||||||
bool get isChatPageCurrentTab => isAndroid
|
bool get isChatPageCurrentTab => isAndroid
|
||||||
? _selectedIndex == 1
|
? _selectedIndex == _chatPageTabIndex
|
||||||
: false; // change this when ios have chat page
|
: false; // change this when ios have chat page
|
||||||
|
|
||||||
void refreshPages() {
|
void refreshPages() {
|
||||||
@ -46,6 +47,7 @@ class HomePageState extends State<HomePage> {
|
|||||||
_pages.clear();
|
_pages.clear();
|
||||||
if (!bind.isIncomingOnly()) _pages.add(ConnectionPage());
|
if (!bind.isIncomingOnly()) _pages.add(ConnectionPage());
|
||||||
if (isAndroid && !bind.isOutgoingOnly()) {
|
if (isAndroid && !bind.isOutgoingOnly()) {
|
||||||
|
_chatPageTabIndex = _pages.length;
|
||||||
_pages.addAll([ChatPage(type: ChatPageType.mobileMain), ServerPage()]);
|
_pages.addAll([ChatPage(type: ChatPageType.mobileMain), ServerPage()]);
|
||||||
}
|
}
|
||||||
_pages.add(SettingsPage());
|
_pages.add(SettingsPage());
|
||||||
|
@ -219,6 +219,20 @@ class _SettingsState extends State<SettingsPage> with WidgetsBindingObserver {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
Provider.of<FfiModel>(context);
|
Provider.of<FfiModel>(context);
|
||||||
final outgoingOnly = bind.isOutgoingOnly();
|
final outgoingOnly = bind.isOutgoingOnly();
|
||||||
|
final customClientSection = CustomSettingsSection(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
if (bind.isCustomClient())
|
||||||
|
Align(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: loadPowered(context),
|
||||||
|
),
|
||||||
|
Align(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: loadLogo(),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
));
|
||||||
final List<AbstractSettingsTile> enhancementsTiles = [];
|
final List<AbstractSettingsTile> enhancementsTiles = [];
|
||||||
final List<AbstractSettingsTile> shareScreenTiles = [
|
final List<AbstractSettingsTile> shareScreenTiles = [
|
||||||
SettingsTile.switchTile(
|
SettingsTile.switchTile(
|
||||||
@ -452,6 +466,7 @@ class _SettingsState extends State<SettingsPage> with WidgetsBindingObserver {
|
|||||||
final disabledSettings = bind.isDisableSettings();
|
final disabledSettings = bind.isDisableSettings();
|
||||||
final settings = SettingsList(
|
final settings = SettingsList(
|
||||||
sections: [
|
sections: [
|
||||||
|
customClientSection,
|
||||||
if (!bind.isDisableAccount())
|
if (!bind.isDisableAccount())
|
||||||
SettingsSection(
|
SettingsSection(
|
||||||
title: Text(translate('Account')),
|
title: Text(translate('Account')),
|
||||||
@ -582,20 +597,7 @@ class _SettingsState extends State<SettingsPage> with WidgetsBindingObserver {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
return Column(
|
return settings;
|
||||||
children: [
|
|
||||||
if (bind.isCustomClient())
|
|
||||||
Align(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: loadPowered(context),
|
|
||||||
),
|
|
||||||
Align(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: loadLogo(),
|
|
||||||
),
|
|
||||||
settings
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<bool> canStartOnBoot() async {
|
Future<bool> canStartOnBoot() async {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user