Improve feed gestures

This commit is contained in:
MM20
2026-01-06 21:50:28 +01:00
parent 7eb5f591d6
commit 93250bd07d
5 changed files with 66 additions and 27 deletions

View File

@@ -29,6 +29,9 @@ interface FeedConnection {
fun startScroll()
fun endScroll()
fun onScroll(progress: Float)
fun openFeed()
fun closeFeed()
}
internal class FeedConnectionImpl(
@@ -77,6 +80,22 @@ internal class FeedConnectionImpl(
}
}
override fun openFeed() {
try {
overlay?.openOverlay(Flags)
} catch (e: RemoteException) {
CrashReporter.logException(e)
}
}
override fun closeFeed() {
try {
overlay?.closeOverlay(Flags)
} catch (e: RemoteException) {
CrashReporter.logException(e)
}
}
fun start() {
activity.lifecycle.addObserver(this)
val service = activity.packageManager.resolveService(serviceIntent, 0)

View File

@@ -1,18 +0,0 @@
package de.mm20.launcher2.feed
import amirz.aidlbridge.IBridgeCallback
import android.content.ComponentName
import android.content.ServiceConnection
import android.os.IBinder
class ServiceConnection: IBridgeCallback.Stub(), ServiceConnection {
override fun onServiceConnected(
name: ComponentName?,
service: IBinder?
) {
}
override fun onServiceDisconnected(name: ComponentName?) {
}
}