mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-12-16 04:09:39 +00:00
Merge pull request #14076 from Simonx22/remove-action1-interface
Android: Replace Action1 helper with Kotlin lambda
This commit is contained in:
commit
9d27c145b9
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user