Skip to content

Commit

Permalink
Remove redundant UI element
Browse files Browse the repository at this point in the history
  • Loading branch information
singularity-s0 committed May 15, 2021
1 parent 9e6c501 commit 0419a0d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 26 deletions.
8 changes: 4 additions & 4 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {

/// List of all of the subpages' action button icon. They will show on the appbar of each tab page.
final List<Function> _subpageRightmostActionButtonIconBuilders = [
(cxt) => Icons.notifications,
(cxt) => PlatformX.isAndroid ? Icons.notifications : SFSymbols.bell_circle,
(cxt) =>
PlatformX.isAndroid ? PlatformIcons(cxt).add : SFSymbols.plus_circle,
(cxt) => PlatformX.isAndroid ? Icons.share : SFSymbols.square_arrow_up,
Expand Down Expand Up @@ -418,12 +418,12 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
}

void _onPressRightsecondActionButton() async {
switch (_pageIndex.value) {
/*switch (_pageIndex.value) {
//Entries omitted
case 1:
AddNewPostEvent().fire(); //TODO: search event
AddNewPostEvent().fire();
break;
}
}*/
}

void _onPressLeadingActionButton() async {
Expand Down
16 changes: 4 additions & 12 deletions lib/page/announcement_notices.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,28 +43,20 @@ class AnnouncementList extends StatefulWidget {

class _AnnouncementListState extends State<AnnouncementList> {
List<Announcement> _data = [];
ScrollController _controller;

@override
void initState() {
super.initState();
}

@override
void didChangeDependencies() {
_controller = PrimaryScrollController.of(context);
super.didChangeDependencies();
}

@override
Widget build(BuildContext context) {
return PlatformScaffold(
iosContentBottomPadding: true,
iosContentPadding: true,
appBar: PlatformAppBarX(
title: TopController(
child: Text(S.of(context).developer_announcement('')),
controller: _controller,
title: Text(
S.of(context).developer_announcement(''),
)),
body: FutureWidget(
future: AnnouncementRepository.getInstance().getAnnouncements(),
Expand All @@ -77,9 +69,9 @@ class _AnnouncementListState extends State<AnnouncementList> {
context: context,
removeTop: true,
child: WithScrollbar(
controller: _controller,
controller: PrimaryScrollController.of(context),
child: ListView(
controller: _controller,
primary: true,
children: _getListWidgets(),
))))
],
Expand Down
21 changes: 11 additions & 10 deletions lib/page/bbs_post.dart
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,17 @@ class _BBSPostDetailState extends State<BBSPostDetail> {
? S.of(context).forum
: S.of(context).search_result),
trailingActions: [
PlatformIconButton(
padding: EdgeInsets.zero,
icon: PlatformX.isAndroid
? const Icon(Icons.reply)
: const Icon(SFSymbols.arrowshape_turn_up_left),
onPressed: () {
BBSEditor.createNewReply(context, _post.id, null)
.then((value) => refreshSelf());
},
)
if (_searchResult == null)
PlatformIconButton(
padding: EdgeInsets.zero,
icon: PlatformX.isAndroid
? const Icon(Icons.reply)
: const Icon(SFSymbols.arrowshape_turn_up_left),
onPressed: () {
BBSEditor.createNewReply(context, _post.id, null)
.then((value) => refreshSelf());
},
)
],
),
body: RefreshIndicator(
Expand Down

0 comments on commit 0419a0d

Please sign in to comment.