- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2.5k
Fix: Fixed an issue where Columns View was incorrectly enabled for Recycle Bin #17803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Open
      
      
            workbysaran
  wants to merge
  7
  commits into
  files-community:main
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
workbysaran:sg/fix-disable-collayout-recyclebin
  
      
      
   
  
    
  
  
  
 
  
      
    base: main
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
  
     Open
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            7 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      c2512cd
              
                Fix:  Fixed an issue where using Column View in the Recycle Bin cause…
              
              
                workbysaran cbc4965
              
                Fix: Fixed Columns View appearing in Recycle Bin when folder preferen…
              
              
                workbysaran c9691aa
              
                Fix:  Fixed an issue where using Column View in the Recycle Bin cause…
              
              
                workbysaran bb070b0
              
                Fix: Fixed Columns View appearing in Recycle Bin when folder preferen…
              
              
                workbysaran ed2b74d
              
                Fix: Fixed Columns View appearing in Recycle Bin when DefaultLayoutMo…
              
              
                workbysaran 6121d46
              
                Merge branch 'sg/fix-disable-collayout-recyclebin' of https://github.…
              
              
                workbysaran 7a44270
              
                Fix: Fixed duplicate Recycle Bin layout condition caused by a merge c…
              
              
                workbysaran File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -486,6 +486,28 @@ public static void SetLayoutPreferencesForPath(string path, LayoutPreferencesIte | |
|  | ||
| private static LayoutPreferencesItem? GetLayoutPreferencesForPath(string path) | ||
| { | ||
| if (path.StartsWith(Constants.UserEnvironmentPaths.RecycleBinPath, StringComparison.Ordinal)) | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add a code comment explaining why we disable Columns View in Recycle Bin? | ||
| { | ||
| var trimmedPath = path.TrimPath() ?? string.Empty; | ||
|  | ||
| var recycleBinPreference = SafetyExtensions.IgnoreExceptions(() => | ||
| { | ||
| var folderFRN = Win32Helper.GetFolderFRN(trimmedPath); | ||
|  | ||
| return GetLayoutPreferencesFromDatabase(trimmedPath, folderFRN) | ||
| ?? GetLayoutPreferencesFromAds(trimmedPath, folderFRN); | ||
| }, App.Logger); | ||
|  | ||
| if (recycleBinPreference is not null && recycleBinPreference.LayoutMode != FolderLayoutModes.ColumnView) | ||
| return recycleBinPreference; | ||
|  | ||
| var defaultPref = new LayoutPreferencesItem(); | ||
| if (defaultPref.LayoutMode == FolderLayoutModes.ColumnView) | ||
| defaultPref.LayoutMode = FolderLayoutModes.DetailsView; | ||
|  | ||
| return defaultPref; | ||
| } | ||
|  | ||
| if (!UserSettingsService.LayoutSettingsService.SyncFolderPreferencesAcrossDirectories) | ||
| { | ||
| path = path.TrimPath() ?? string.Empty; | ||
|  | ||
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.