mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-08-19 05:00:21 +02:00
Improve icon loading after last commit
This commit is contained in:
@@ -227,9 +227,9 @@ class _AppPageState extends State<AppPage> {
|
||||
children: [
|
||||
const SizedBox(height: 20),
|
||||
FutureBuilder(
|
||||
future: app?.installedInfo?.applicationInfo?.getAppIcon(),
|
||||
future: appsProvider.updateAppIcon(app?.app.id),
|
||||
builder: (ctx, val) {
|
||||
return val.data != null
|
||||
return app?.icon != null
|
||||
? Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
@@ -238,7 +238,7 @@ class _AppPageState extends State<AppPage> {
|
||||
? null
|
||||
: () => pm.openApp(app.app.id),
|
||||
child: Image.memory(
|
||||
val.data!,
|
||||
app!.icon!,
|
||||
height: 150,
|
||||
gaplessPlayback: true,
|
||||
),
|
||||
|
@@ -407,12 +407,11 @@ class AppsPageState extends State<AppsPage> {
|
||||
|
||||
getAppIcon(int appIndex) {
|
||||
return FutureBuilder(
|
||||
future:
|
||||
listedApps[appIndex].installedInfo?.applicationInfo?.getAppIcon(),
|
||||
future: appsProvider.updateAppIcon(listedApps[appIndex].app.id),
|
||||
builder: (ctx, val) {
|
||||
return val.data != null
|
||||
return listedApps[appIndex].icon != null
|
||||
? Image.memory(
|
||||
val.data!,
|
||||
listedApps[appIndex].icon!,
|
||||
gaplessPlayback: true,
|
||||
)
|
||||
: Row(
|
||||
|
Reference in New Issue
Block a user