OpenLauncherTeam / openlauncher

Customizable and Open Source Launcher for Android
Apache License 2.0
1.44k stars 416 forks source link

Screens added to left of homescreen vanish after launcher restart #370

Closed tp0 closed 5 years ago

tp0 commented 6 years ago

Repro:

  1. Have a setup where the current homescreen is the left-most screen (screen 1 = homescreen)
  2. Drag one or more shortcuts/icons to the left to create a new screen (screen 1, screen 2 = homescreen)
  3. Restart OpenLauncher
  4. Result: The left-most screen (screen 1) is gone, and usually the icons that used to be there show up on the homescreen (screen 2). Depending on the arragement of the icons, they can overlap (graphical glitch) with existing icons.

Setting the newly created left-most screen as the new homescreen does not make a difference. Neither does locking the setup.

General information

gsantner commented 6 years ago

that may have todo with array index, but unsure about that part of logic. @BennyKok knows better or?

dkanada commented 6 years ago

When a new page is created the desktop renumbers the pages immediately, so when an item is moved to a new page on the left it is saved to the wrong index. I couldn't think of a decent way to fix this without coding in a special case. One possible solution would be renumbering all existing items when a new page is created, but that is not ideal.

BennyKok commented 6 years ago

I don’t remember, wanna do a rewrite

gsantner commented 6 years ago

so i can stop working on OL an fixing things? πŸ˜…

BennyKok commented 6 years ago

I mean rewrite part of itπŸ˜‚πŸ˜‚

gsantner commented 6 years ago

xd. Maybe we should make sure our communication channels work and we are all in to know what todo. Dont care what but it should work to reach people in group chat^^

BennyKok commented 6 years ago

Btw, i dont have xmpp now, cuz i am using iphone as my daily driver πŸ˜ͺ, as dkanada still dont have riot, will u guys be interested in using slack?

gsantner commented 6 years ago

Why do you dev that then?^^

@dkanada cant you install riot? its available from fdroid too

Riot.im (Open team collaboration) - https://f-droid.org/app/im.vector.alpha

BennyKok commented 6 years ago

What dev? Just a suggestion.

gsantner commented 6 years ago

I mean why develop android launcher when you use mainly an iOS device πŸ˜€πŸ˜„

dkanada commented 6 years ago

Speaking of rewrites, I think the codebase would be much easier to understand if we merged the core with the main app again. The core isn't used by very many projects and it makes working on the application somewhat confusing. Either way works though.

gsantner commented 6 years ago

agreeing. what do you think about kotlin vs java as main code part (i know interoptable and stuff, but still, its about writing and reading code, not executing)? @dkanada @BennyKok

I think not much contributors know kotlin well yet, that may change but thats what I feel like and may be the reason that there are no code contribs from community

dkanada commented 6 years ago

I personally have no experience with Kotlin yet, although I do want to learn at some point. I am not sure we would get many code contributions regardless though, this is a pretty small project compared to some of the other launchers.

gsantner commented 6 years ago

If I'm having enough time to finish and get thumbs up from you two I would do merge-together-again now, with auto-format etc and basic fixes as reported by lint

BennyKok commented 6 years ago

I see, then maybe we keep on doing those with Java

gsantner commented 6 years ago

then maybe we just reset back to as before mflisar-core changes came and try to reimportant new stuff? I'm feeling like not much has changed since that.

@dkanada could you start https://riot.im/app/ in your browser and message me (gsantner:matrix.org) No register or login required? this would make discussing easier.

BennyKok commented 6 years ago

I agree doing that tho :), so java :)

gsantner commented 6 years ago

@dkanada @BennyKok

As we see in the issue above, exactly as thought, yes Kotlin IS a problem for some potential contributors: https://github.com/OpenLauncherTeam/openlauncher/issues/376

dkanada commented 6 years ago

@gsantner were you working on merging the core back in or can I get that done today or tomorrow?

gsantner commented 6 years ago

Didn't get to it because had release day on Markor and Stringlate yesterday, with 12h+ work^^.

But yep, I'm gonna do it and will write here when I'm done, but please let me start because I noticed several stuff which needs to be fixed also and goes easy in this back-factor way

BennyKok commented 6 years ago

yea, kotlin did have some impact on the existing java code base

BennyKok commented 6 years ago

@gsantner I still wanna dev this because I started out this, gonna continue it anyway ha ha, it is still my passion

gsantner commented 6 years ago

Note though, I like kotlin and it's features. But the code is basically java converted, and as one would write java code. And the additional thing as above said is, more people know plain java including the one who just wanted to started contributing yesterday.

If we would have really wanted to go kotlin, we should have decided to dump the old code and re-implement, but we didn't.

gsantner commented 6 years ago

bookmark https://github.com/OpenLauncherTeam/openlauncher/tree/c7243bdecdd05ecfd9924d4aa3a70d2aef92788c/app/src/main/java/com/benny/openlauncher

First kotlin commit: 2d0e860f5d3a5593058903639da16613664576da

After mostly kotlin changes: cebd543ae779c41e4c5e91f5562dfc84551d582f

Last change commit: 956ab27636f736996fc3172a5ff31aa2ee1ca42e

gsantner commented 6 years ago

I finished most java-back-migration, core merging and removing+combining interfaces.

Can you guys do the rest? Please exclude SettingsActivity,AboutActivity and the Preference stuff. Gonna fully replace that anyway. Everything else please do.

BennyKok commented 6 years ago

@sure, i will do the testing tonight

gsantner commented 6 years ago

Should be all fine as tested on mine. But would be fine if you could do the left java-back conversation said above :D.

I just renamed to java file and reworked line by line.

BennyKok commented 6 years ago

Have not try reverting before, tho

gsantner commented 6 years ago

its not reverting git, its converting code by hand the other way :D

gsantner commented 6 years ago

@BennyKok @dkanada I have completely reworked everything, including but not limited to

I have done really much this week and pretty much did most stuff alone here for months. Now it's your turn again to make it better. Hope I didn't do this to keep working alone on it, as in both contributor and team level :smiley:.

grafik

gsantner commented 6 years ago

https://github.com/gsantner/opoc/blob/master/shell/android-check-preference-keys-dupplication.sh can be used for pref checking