Giter Club home page Giter Club logo

Comments (18)

fasheng avatar fasheng commented on August 20, 2024

capturadeepin20160119012557

from developer-center.

kosl90 avatar kosl90 commented on August 20, 2024

@dragondjf 我测试了一下,不知道前端是什么情况,后端似乎没什么问题,把/var/lib/lastore/categories.json删除后可以重现,你找时间看看吧

from developer-center.

fasheng avatar fasheng commented on August 20, 2024

经调试发现,archlinux 上后端 DBus 接口 GetAllCategoryInfos 返回的 category 以小写字母开头,而 Deepin 上则为大写字母,如

[('development', 2L, ['ipython3', 'd-feet', 'xoo', 'ipython']),
('reading', 3L, []),
('game', 5L, [])]

前端则是直接定义的常量
https://github.com/linuxdeepin/dde-launcher/blob/master/app/global.h#L22

from developer-center.

kosl90 avatar kosl90 commented on August 20, 2024

不应该是这个原因,不论是有没有我说的那个文件,返回的都是全小写的

from developer-center.

fasheng avatar fasheng commented on August 20, 2024

确实是大小写的问题,我把前端的 CategoryKeys 改为全小写后正常

const QStringList CategroyKeys{
    "internet",
    "chat",
    "music",
    "video",
    "graphics",
    "game",
    "office",
    "reading",
    "development",
    "system",
    "others"
};

from developer-center.

sbwtw avatar sbwtw commented on August 20, 2024

那这个很容易处理呀,比较的时候ignore case就行了

from developer-center.

fasheng avatar fasheng commented on August 20, 2024

建议前后端均使用小写,否则前端有多处代码要处理 CategroyKeys 大小写问题,容易遗漏。

from developer-center.

kosl90 avatar kosl90 commented on August 20, 2024

我把字段看错了,确实是不应该传小写的字符串,是我这边fallback的错。因为以前是用的数字作为分类的id,但是新的软件商店用的是字符串,所以加了一层处理。
前端在处理的时候直接忽略了我传的数字id,其实那个数字才是id,字符串是分类的名字,不应该直接使用。之前有提过这个问题,但是还没有改过来。

from developer-center.

Iceyer avatar Iceyer commented on August 20, 2024

Desktop文件中的Categroy好像有大写的,这里还是要ignore case吧

from developer-center.

kosl90 avatar kosl90 commented on August 20, 2024

@Iceyer 跟desktop里面的没关系,这个是我们自己软件商店的分类,这个字段其实使用来显示的,并不是作为key来使用,但是前端没有正确使用这个字段(前端自己处理了国际化,所以后端现在也没有国际化这个字段了),其实这种操作都应该是尽量ignore case的,但是前端没处理我也没办法

from developer-center.

fasheng avatar fasheng commented on August 20, 2024

我觉得 key/id 这种用于标识的字符串使用时还是不要做 ignore case 处理比较好。

不过话说回来,Desktop 文件中的 Categories 应该都是按规范来填写的(即便同时出现 internet Internet 两种 Category,由后端归类时处理下就可以),所以直接使用原生 Category 名称(前后端均不做任何大小写处理)来做 id 似乎也没问题。

from developer-center.

kosl90 avatar kosl90 commented on August 20, 2024

用字符串做id时确实不做ignore case比较好,但是这里返回的字符串不是做id用的不是做id用的不是做id用的。因为效率和case等原因,字符串本身一般情况下也不是做id的最好选择。

跟desktop文件里的Categories字段一毛钱关系都没有一毛钱关系都没有一毛钱关系都没有
不要歪楼不要歪楼不要歪楼

from developer-center.

fasheng avatar fasheng commented on August 20, 2024

原来如此 😅

from developer-center.

mseba101 avatar mseba101 commented on August 20, 2024

hi ive installed arch..and i have the same issue...how can i solve it...
thanks

from developer-center.

kosl90 avatar kosl90 commented on August 20, 2024

@mseba101 please wait a monent, we are dealing with it. It will be merged as soon as possible.

from developer-center.

mseba101 avatar mseba101 commented on August 20, 2024

you are very kind ...thanks for the reply
linux !!

2016-01-27 23:54 GMT-03:00, 李立强 [email protected]:

@mseba101 please wait a monent, we are dealing with it. It will be merged as
soon as possible.


Reply to this email directly or view it on GitHub:
#24 (comment)

from developer-center.

fasheng avatar fasheng commented on August 20, 2024

Thanks, solved now. Let's just wait for dde-launcher 3.0.4 and dde-daemon 3.0.8 in archlinux~

from developer-center.

mseba101 avatar mseba101 commented on August 20, 2024

ok im using gnome/cinnamon and plasma 5 on my desktop if deepin hadnt had
that bug it would ve been perfect for my desktop!
arch runs pretty well ..sometimes strange things happen witth my wifi but
its not a soft. issue i think its connected with my ssd hard drive....ill
wait for the packages
thank you !

2016-01-28 23:49 GMT-03:00 Xu Fasheng [email protected]:

Closed #24 #24.


Reply to this email directly or view it on GitHub
#24 (comment)
.

from developer-center.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.