wails/v3/pkg/application/mainthread_android.go
Lea Anthony db8f1f3d41 chore: remove temporary debug print statements from mobile merge
Remove emoji debug logs (🔴, 🟢, 🟠, 🔵, 🔥) that were accidentally left in
from the iOS/Android mobile platform support merge. These were development
debugging statements that should not have been included in the final code.

Files cleaned:
- application.go
- application_debug.go
- init_android.go
- init_ios.go
- mainthread_android.go
- mainthread_ios.go
- webview_window.go
- webview_window_ios.go

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 06:26:23 +11:00

25 lines
777 B
Go

//go:build android
package application
// isOnMainThread returns whether the current goroutine is on the main thread
func (a *androidApp) isOnMainThread() bool {
// On Android, Go runs in its own thread separate from the UI thread
// UI operations need to be dispatched via JNI to the main thread
return false
}
// dispatchOnMainThread executes a function on the Android main/UI thread
func (a *androidApp) dispatchOnMainThread(id uint) {
// TODO: Implement via JNI callback to Activity.runOnUiThread()
// For now, execute the callback directly
mainThreadFunctionStoreLock.RLock()
fn := mainThreadFunctionStore[id]
if fn == nil {
mainThreadFunctionStoreLock.RUnlock()
return
}
delete(mainThreadFunctionStore, id)
mainThreadFunctionStoreLock.RUnlock()
fn()
}