mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-07-08 14:45:58 +08:00
修复部分环境下仍然会弹出tag的问题
This commit is contained in:
parent
8f6e6a9f37
commit
1efc83817b
@ -409,48 +409,49 @@ void AppIntoPage::setAppinfoTags(const QStringList &tagList)
|
||||
bool debianSupport = false;
|
||||
bool hasAmberTag = false;
|
||||
|
||||
// First pass: Check if any Amber tags exist
|
||||
foreach (const QString &tag, tagList)
|
||||
{
|
||||
if (tag.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
else if (tag == "community")
|
||||
if (tag == "amber-ce-bookworm" || tag == "amber-ce-trixie")
|
||||
{
|
||||
ui->tag_community->show();
|
||||
}
|
||||
else if (tag == "dtk5")
|
||||
{
|
||||
ui->tag_dtk5->show();
|
||||
}
|
||||
else if (tag == "dwine2")
|
||||
{
|
||||
ui->tag_dwine2->show();
|
||||
}
|
||||
else if (tag == "dwine5")
|
||||
{
|
||||
ui->tag_dwine5->show();
|
||||
}
|
||||
else if (tag == "a2d")
|
||||
{
|
||||
ui->tag_a2d->show();
|
||||
}
|
||||
else if (tag == "native")
|
||||
{
|
||||
ui->tag_native->show();
|
||||
}
|
||||
else if (tag == "amber-ce-bookworm")
|
||||
{
|
||||
ui->tag_amber_ce_bookworm->show();
|
||||
hasAmberTag = true;
|
||||
break; // No need to continue checking
|
||||
}
|
||||
else if (tag == "amber-ce-trixie")
|
||||
{
|
||||
ui->tag_amber_ce_trixie->show();
|
||||
hasAmberTag = true;
|
||||
}
|
||||
else if (!hasAmberTag) // Only process distro tags if we haven't found an amber tag
|
||||
{
|
||||
}
|
||||
|
||||
// Second pass: Apply tags based on whether we have Amber tags
|
||||
foreach (const QString &tag, tagList)
|
||||
{
|
||||
if (tag.isEmpty())
|
||||
continue;
|
||||
|
||||
if (tag == "native")
|
||||
ui->tag_native->show();
|
||||
|
||||
else if (tag == "community")
|
||||
ui->tag_community->show();
|
||||
|
||||
else if (tag == "dtk5")
|
||||
ui->tag_dtk5->show();
|
||||
|
||||
else if (tag == "dwine2")
|
||||
ui->tag_dwine2->show();
|
||||
|
||||
else if (tag == "dwine5")
|
||||
ui->tag_dwine5->show();
|
||||
|
||||
else if (tag == "a2d")
|
||||
ui->tag_a2d->show();
|
||||
|
||||
else if (tag == "amber-ce-bookworm")
|
||||
ui->tag_amber_ce_bookworm->show();
|
||||
|
||||
else if (tag == "amber-ce-trixie")
|
||||
ui->tag_amber_ce_trixie->show();
|
||||
|
||||
// Only process distro tags if there are no Amber tags
|
||||
else if (!hasAmberTag)
|
||||
{
|
||||
if (tag == "debian")
|
||||
{
|
||||
ui->tag_debian->show();
|
||||
@ -475,12 +476,11 @@ void AppIntoPage::setAppinfoTags(const QStringList &tagList)
|
||||
}
|
||||
|
||||
if (!hasAmberTag)
|
||||
{
|
||||
notifyUserUnsupportedTags(ubuntuSupport, deepinSupport, uosSupport, debianSupport);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void AppIntoPage::notifyUserUnsupportedTags(bool ubuntuSupport, bool deepinSupport, bool uosSupport, bool debianSupport)
|
||||
{
|
||||
if (!SettingsPage::needUncompatibleNotification) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user