Skip to content

Commit

Permalink
Rollback the search to a PopupWindow
Browse files Browse the repository at this point in the history
  • Loading branch information
falzonv committed Jul 12, 2021
1 parent 922dd8f commit 7ba591a
Show file tree
Hide file tree
Showing 9 changed files with 181 additions and 153 deletions.
7 changes: 0 additions & 7 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,6 @@
android:excludeFromRecents="true">
</activity>

<activity
android:name=".ActivitySearch"
android:theme="@style/AppThemeNotification"
android:excludeFromRecents="true"
android:windowSoftInputMode="stateAlwaysVisible">
</activity>

</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,12 @@
import com.vincent_falzon.discreetlauncher.core.ApplicationsList ;
import com.vincent_falzon.discreetlauncher.core.Folder ;
import com.vincent_falzon.discreetlauncher.core.Menu ;
import com.vincent_falzon.discreetlauncher.core.Search ;
import com.vincent_falzon.discreetlauncher.events.ShortcutLegacyListener ;
import com.vincent_falzon.discreetlauncher.events.MinuteListener ;
import com.vincent_falzon.discreetlauncher.events.PackagesListener ;
import com.vincent_falzon.discreetlauncher.notification.NotificationDisplayer ;
import com.vincent_falzon.discreetlauncher.settings.ActivitySettings ;
import com.vincent_falzon.discreetlauncher.storage.InternalFileTXT ;
import java.util.Set ;

/**
* Main class activity managing the home screen and applications drawer.
Expand Down Expand Up @@ -666,9 +665,12 @@ public void onPause()
// Always show the system bars
displaySystemBars(true) ;

// Hide folders if some are still opened
// Hide popups if some are still opened
for(Application application : applicationsList.getDrawer())
{
if(application instanceof Folder) ((Folder)application).closePopup() ;
if(application instanceof Search) ((Search)application).closePopup() ;
}
}


Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,13 @@ public ArrayList<Application> getApplicationsNotInFolders()
{
ArrayList<Application> result = new ArrayList<>() ;
for(Application application : drawer)
{
// Skip the search application
if(application instanceof Search) continue ;

// Add all user applications outside folders
if(!(application instanceof Folder)) result.add(application) ;
}
return result ;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,12 @@ public static void open(View view)
@Override
public void onClick(DialogInterface dialog, int selection)
{
// Hide folders if some are still opened
// Hide popups if some are still opened
for(Application application : ActivityMain.getApplicationsList().getDrawer())
{
if(application instanceof Folder) ((Folder)application).closePopup() ;
if(application instanceof Search) ((Search)application).closePopup() ;
}

// Check which option has been selected
switch(selection)
Expand Down
Loading

0 comments on commit 7ba591a

Please sign in to comment.