ref(ui): remove initial data to fix flickering in mentions overlay.
Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
@@ -67,7 +67,6 @@ class UserMentionsOverlay extends StatefulWidget {
|
|||||||
|
|
||||||
class _UserMentionsOverlayState extends State<UserMentionsOverlay> {
|
class _UserMentionsOverlayState extends State<UserMentionsOverlay> {
|
||||||
late Future<List<User>> userMentionsFuture;
|
late Future<List<User>> userMentionsFuture;
|
||||||
late List<User> initialMentions = membersAndWatchers;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@@ -102,8 +101,9 @@ class _UserMentionsOverlayState extends State<UserMentionsOverlay> {
|
|||||||
decoration: BoxDecoration(color: theme.colorTheme.barsBg),
|
decoration: BoxDecoration(color: theme.colorTheme.barsBg),
|
||||||
child: FutureBuilder<List<User>>(
|
child: FutureBuilder<List<User>>(
|
||||||
future: userMentionsFuture,
|
future: userMentionsFuture,
|
||||||
initialData: initialMentions,
|
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
|
if (snapshot.hasError) return const Offstage();
|
||||||
|
if (!snapshot.hasData) return const Offstage();
|
||||||
final users = snapshot.data!;
|
final users = snapshot.data!;
|
||||||
return ListView.builder(
|
return ListView.builder(
|
||||||
padding: const EdgeInsets.all(0),
|
padding: const EdgeInsets.all(0),
|
||||||
|
|||||||
Reference in New Issue
Block a user