mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-15 13:22:04 +08:00
修复部分环境下仍然会弹出tag的问题
This commit is contained in:
@@ -409,48 +409,49 @@ void AppIntoPage::setAppinfoTags(const QStringList &tagList)
|
|||||||
bool debianSupport = false;
|
bool debianSupport = false;
|
||||||
bool hasAmberTag = false;
|
bool hasAmberTag = false;
|
||||||
|
|
||||||
|
// First pass: Check if any Amber tags exist
|
||||||
foreach (const QString &tag, tagList)
|
foreach (const QString &tag, tagList)
|
||||||
{
|
{
|
||||||
if (tag.isEmpty()) {
|
if (tag == "amber-ce-bookworm" || tag == "amber-ce-trixie")
|
||||||
continue;
|
|
||||||
}
|
|
||||||
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 == "native")
|
|
||||||
{
|
|
||||||
ui->tag_native->show();
|
|
||||||
}
|
|
||||||
else if (tag == "amber-ce-bookworm")
|
|
||||||
{
|
|
||||||
ui->tag_amber_ce_bookworm->show();
|
|
||||||
hasAmberTag = true;
|
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")
|
if (tag == "debian")
|
||||||
{
|
{
|
||||||
ui->tag_debian->show();
|
ui->tag_debian->show();
|
||||||
@@ -475,12 +476,11 @@ void AppIntoPage::setAppinfoTags(const QStringList &tagList)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!hasAmberTag)
|
if (!hasAmberTag)
|
||||||
{
|
|
||||||
notifyUserUnsupportedTags(ubuntuSupport, deepinSupport, uosSupport, debianSupport);
|
notifyUserUnsupportedTags(ubuntuSupport, deepinSupport, uosSupport, debianSupport);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void AppIntoPage::notifyUserUnsupportedTags(bool ubuntuSupport, bool deepinSupport, bool uosSupport, bool debianSupport)
|
void AppIntoPage::notifyUserUnsupportedTags(bool ubuntuSupport, bool deepinSupport, bool uosSupport, bool debianSupport)
|
||||||
{
|
{
|
||||||
if (!SettingsPage::needUncompatibleNotification) {
|
if (!SettingsPage::needUncompatibleNotification) {
|
||||||
|
|||||||
Reference in New Issue
Block a user