@@ -183,7 +183,7 @@ public void Update()
183183 // maxLevelsInMemoryCushion is the number of worlds we keep textures for on each side of the
184184 // cursor's current position. If a user is just scrolling forward, this will limit us to
185185 // about 100 textures in memory. If the user is scrolling forward and backward we may have
186- // up to 200 textures.
186+
187187 int maxLevelsInMemoryCushion = 100 ;
188188 if ( queries . Count > 0 )
189189 {
@@ -354,6 +354,29 @@ public bool StartFetchingMore(ILevelSetQuery query)
354354 string keywords = filter . SearchString ;
355355 string creator = ( filter . FilterGenres & Genres . MyWorlds ) != 0 ? Auth . CreatorName : null ;
356356
357+ // In the Community menu we can't rely on the MyWorlds bit to indicate that MyWorlds
358+ // has been chosen since it's included in All. For the Community
359+ creator = filter . FilterGenres == Genres . All ? null : Auth . CreatorName ;
360+ creator = Auth . CreatorName ;
361+
362+ // In the Community menu we can't rely on the MyWorlds bit to indicate that MyWorlds
363+ // has been chosen since it's included in All. We also can't use the grid settings
364+ // because they don't seem to be right. I suspect that it's due to the selection
365+ // state not filtering through on the first frame.
366+ //
367+ // For the Community browser we start by assuming MyWorlds is chosen and clear it if
368+ // - Filter is set to All
369+ // - MyWorlds bit is clear
370+ // - CreatorName is Guest
371+ //
372+ // creatorName is then passed to the server where, if it's not null, we use the "MyWorlds" version of Search and Get.
373+ string creatorName = Auth . CreatorName ;
374+ if ( filter . FilterGenres == Genres . All || ( ( filter . FilterGenres & Genres . MyWorlds ) == 0 ) || Auth . CreatorName == Auth . DefaultCreatorName )
375+ {
376+ creatorName = null ;
377+ }
378+ Debug . WriteLine ( creatorName ) ;
379+
357380 pagingOpCount += 1 ;
358381
359382
@@ -366,7 +389,8 @@ public bool StartFetchingMore(ILevelSetQuery query)
366389 sortDir = sortDir ,
367390 range = "all" ,
368391 keywords = keywords ,
369- creator = creator
392+ creator = creator ,
393+ creatorName = creatorName
370394 } ;
371395 KoduService . Search ( args , ( object results ) => {
372396 //4scoy NOTE in case of fail (results==null) we still pass
0 commit comments