Android: Replace Action1 helper with Kotlin lambda

This commit is contained in:
Simonx22 2025-11-07 11:56:11 -05:00
parent 5650be6842
commit ddbbb2ea4b
2 changed files with 2 additions and 11 deletions

View File

@ -29,7 +29,6 @@ import org.dolphinemu.dolphinemu.fragments.GridOptionDialogFragment
import org.dolphinemu.dolphinemu.services.GameFileCacheManager
import org.dolphinemu.dolphinemu.ui.platform.PlatformGamesView
import org.dolphinemu.dolphinemu.ui.platform.PlatformTab
import org.dolphinemu.dolphinemu.utils.Action1
import org.dolphinemu.dolphinemu.utils.AfterDirectoryInitializationRunner
import org.dolphinemu.dolphinemu.utils.DirectoryInitialization
import org.dolphinemu.dolphinemu.utils.FileBrowserHelper
@ -257,11 +256,11 @@ class MainActivity : AppCompatActivity(), MainView, OnRefreshListener, ThemeProv
override fun showGridOptions() =
GridOptionDialogFragment().show(supportFragmentManager, "gridOptions")
private fun forEachPlatformGamesView(action: Action1<PlatformGamesView>) {
private fun forEachPlatformGamesView(action: (PlatformGamesView) -> Unit) {
for (platformTab in PlatformTab.values()) {
val fragment = getPlatformGamesView(platformTab)
if (fragment != null) {
action.call(fragment)
action(fragment)
}
}
}

View File

@ -1,8 +0,0 @@
// SPDX-License-Identifier: GPL-2.0-or-later
package org.dolphinemu.dolphinemu.utils;
public interface Action1<T>
{
void call(T t);
}