Skipping PosterScreen - back functionality broken

When you open my app you are presented with a list of ‘content providers’ (this is the HomeScreen) each content provider has a list of feeds when you click into them (The Poster screen).

When a provider only has one feed my app will just go right to the DetailScreen of that feed. However if you hit back (The up arrow) and return to the HomeScreen) you are then unable to select any of the content providers. You can scroll to any of them, but pressing enter does nothing and there is no debug output.

If I render the poster screen and then jump into the details page automatically this will work because hitting the back button takes you the PostScreen (there will only be the single feed) and then back again will take you to the HomeScreen and everything works fine. However, this looks a bit clunky and would love to avoid having to do this. I suspect I just need to do something on exit of the details page. I’m just not sure what.

Having Issues:

    categories = getSourceCategoriesList(source)
    shows = getShowsForSourceItem(source, m.curSource)
    screen.SetListNames(categories)
    screen.SetContentList(shows)
        
    if shows.Count() = 1
      print "Only 1 show was found...Choosing that"
      m.curShow = displayShowDetailScreen(source, m.curShow)
      'screen.SetFocusedListItem(m.curShow)
      print "list item updated  | new show = "; m.curShow      
    else
      screen.Show()
    end if

Works, but clunky:

    categories = getSourceCategoriesList(source)
    shows = getShowsForSourceItem(source, m.curSource)
    screen.SetListNames(categories)
    screen.SetContentList(shows)
    screen.Show()
    
    if shows.Count() = 1
      print "Only 1 show was found...Choosing that"
      m.curShow = displayShowDetailScreen(source, m.curShow)
      'screen.SetFocusedListItem(m.curShow)
      print "list item updated  | new show = "; m.curShow      
    end if

You didn’t share all your code, but I suspect your event loop processing doesn’t match your screen display stack. Your screens get added to the display stack when you call Show() and will get focus after the screen above it pops. When your screen has focus, it can send events to your brightscript app.

Make sure event loop processing matches the display stack. This is natural when you have a function that includes a Show() and event processing for a particular screen.

–Kevin

I have resolved the issue, thanks for your help.

I re-architected so the message ports were not opened if the screen was being skipped (which makes sense).