fix(block2): back buttons on social screens + clear 'Share my seeds' button
Two UX reports: - Market/Messages (and Profile/Chat) had no back button — they were opened with context.go (replaces the stack). Switched the drawer entries, home Market card, offer 'Message' link and inbox taps to context.push, so the AppBar shows a back arrow to return. - The market's upload icon (tooltip-only) was unclear. Replaced it with a labelled FloatingActionButton.extended 'Share my seeds' (campaign icon); the config gear stays in the AppBar. Analyzer clean.
This commit is contained in:
parent
8ef587176f
commit
b96b6e45cc
4 changed files with 15 additions and 13 deletions
|
|
@ -41,7 +41,7 @@ class AppDrawer extends StatelessWidget {
|
||||||
onTap: marketEnabled
|
onTap: marketEnabled
|
||||||
? () {
|
? () {
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
context.go('/market');
|
context.push('/market');
|
||||||
}
|
}
|
||||||
: null,
|
: null,
|
||||||
),
|
),
|
||||||
|
|
@ -51,7 +51,7 @@ class AppDrawer extends StatelessWidget {
|
||||||
onTap: marketEnabled
|
onTap: marketEnabled
|
||||||
? () {
|
? () {
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
context.go('/profile');
|
context.push('/profile');
|
||||||
}
|
}
|
||||||
: null,
|
: null,
|
||||||
),
|
),
|
||||||
|
|
@ -61,7 +61,7 @@ class AppDrawer extends StatelessWidget {
|
||||||
onTap: marketEnabled
|
onTap: marketEnabled
|
||||||
? () {
|
? () {
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
context.go('/messages');
|
context.push('/messages');
|
||||||
}
|
}
|
||||||
: null,
|
: null,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ class _ChatListScreenState extends State<ChatListScreen> {
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
onTap: () => context.go('/chat/${c.peerPubkey}'),
|
onTap: () => context.push('/chat/${c.peerPubkey}'),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ class HomeScreen extends StatelessWidget {
|
||||||
subtitle: t.home.openMarketSubtitle,
|
subtitle: t.home.openMarketSubtitle,
|
||||||
tag: marketEnabled ? null : t.common.comingSoon,
|
tag: marketEnabled ? null : t.common.comingSoon,
|
||||||
onTap: marketEnabled
|
onTap: marketEnabled
|
||||||
? () => context.go('/market')
|
? () => context.push('/market')
|
||||||
: null,
|
: null,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -148,13 +148,6 @@ class _MarketScreenState extends State<MarketScreen> {
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text(t.market.title),
|
title: Text(t.market.title),
|
||||||
actions: [
|
actions: [
|
||||||
if (cubit != null && (cubit.isOnline || widget.outbox != null))
|
|
||||||
IconButton(
|
|
||||||
key: const Key('market.shareMine'),
|
|
||||||
icon: const Icon(Icons.ios_share_outlined),
|
|
||||||
tooltip: t.market.shareMine,
|
|
||||||
onPressed: _shareMine,
|
|
||||||
),
|
|
||||||
IconButton(
|
IconButton(
|
||||||
key: const Key('market.config'),
|
key: const Key('market.config'),
|
||||||
icon: const Icon(Icons.tune),
|
icon: const Icon(Icons.tune),
|
||||||
|
|
@ -163,6 +156,15 @@ class _MarketScreenState extends State<MarketScreen> {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
floatingActionButton:
|
||||||
|
cubit != null && (cubit.isOnline || widget.outbox != null)
|
||||||
|
? FloatingActionButton.extended(
|
||||||
|
key: const Key('market.shareMine'),
|
||||||
|
onPressed: _shareMine,
|
||||||
|
icon: const Icon(Icons.campaign_outlined),
|
||||||
|
label: Text(t.market.shareMine),
|
||||||
|
)
|
||||||
|
: null,
|
||||||
body: _loading || cubit == null
|
body: _loading || cubit == null
|
||||||
? const Center(child: CircularProgressIndicator())
|
? const Center(child: CircularProgressIndicator())
|
||||||
: BlocProvider.value(
|
: BlocProvider.value(
|
||||||
|
|
@ -232,7 +234,7 @@ class MarketBody extends StatelessWidget {
|
||||||
return _OfferCard(
|
return _OfferCard(
|
||||||
offer: o,
|
offer: o,
|
||||||
mine: mine,
|
mine: mine,
|
||||||
onContact: mine ? null : () => context.go('/chat/${o.authorPubkeyHex}'),
|
onContact: mine ? null : () => context.push('/chat/${o.authorPubkeyHex}'),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue