xibbon / LaTerminal

50 stars 2 forks source link

Monitor crashes on iPad inside ensureMonitor #36

Open migueldeicaza opened 1 year ago

migueldeicaza commented 1 year ago

Because the hack to find our terminal:

func sshTerminalGetter () -> SshTerminalView? {
        return TerminalViewController.visibleTerminal as? SshTerminalView
    }

Can return nil.

This is a band-aid that clearly is happening if the user is using the iPad, as the visibleTerminal will get out of sync, would love to see if Instabug caught that one, and the steps.

This is caused by our visibleTerminal global not being in sync with the terminal the user is tapping on.

We need a better way of tracking down the current terminal. Perhaps surfacing some sort of Observable object in the UIViewController wrapper that the SwiftUI code can hook up to.