mirror of
				https://github.com/vector-im/element-web.git
				synced 2025-11-04 02:02:14 +01:00 
			
		
		
		
	Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
		
						commit
						869a2d158f
					
				@ -217,7 +217,7 @@ class Tinter {
 | 
				
			|||||||
        // cache our fixups
 | 
					        // cache our fixups
 | 
				
			||||||
        if (this.cssFixups[this.theme]) return;
 | 
					        if (this.cssFixups[this.theme]) return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (DEBUG) console.trace("calcCssFixups start for " + this.theme + " (checking " +
 | 
					        if (DEBUG) console.debug("calcCssFixups start for " + this.theme + " (checking " +
 | 
				
			||||||
                                 document.styleSheets.length + 
 | 
					                                 document.styleSheets.length + 
 | 
				
			||||||
                                 " stylesheets)");
 | 
					                                 " stylesheets)");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -931,7 +931,17 @@ module.exports = React.createClass({
 | 
				
			|||||||
            Tinter.tint(colors[0], colors[1]);
 | 
					            Tinter.tint(colors[0], colors[1]);
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (styleElements[theme].complete) {
 | 
					        let cssLoaded = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        for (let i = 0; i < document.styleSheets.length; i++) {
 | 
				
			||||||
 | 
					            const ss = document.styleSheets[i];
 | 
				
			||||||
 | 
					            if (ss && ss.href === styleElements[theme].href) {
 | 
				
			||||||
 | 
					                cssLoaded = true;
 | 
				
			||||||
 | 
					                break;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (cssLoaded) {
 | 
				
			||||||
            switchTheme();
 | 
					            switchTheme();
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            styleElements[theme].onload = () => {
 | 
					            styleElements[theme].onload = () => {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user