Skip to content

Commit 890de29

Browse files
committed
Fix flickering of default icons in FuzzyFinder
Resolves #481.
1 parent 35375e4 commit 890de29

File tree

4 files changed

+24
-1
lines changed

4 files changed

+24
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
77
[Unpublished]
88
--------------------
99
### Fixed
10+
- [[`#481`][]] Rendering issue in Fuzzy-Finder
1011
- [[`#483`][]] Wrong colour used for `_spec.rb` files
1112
- [[`#489`][]] Wrong icon used for Dockerfiles
1213

14+
[`#481`]: https://github.com/DanBrooker/file-icons/issues/481
1315
[`#483`]: https://github.com/DanBrooker/file-icons/issues/483
1416
[`#489`]: https://github.com/DanBrooker/file-icons/issues/489
1517

lib/main.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,7 @@ module.exports = {
3434

3535
serialize(){ return Storage.data; },
3636

37-
provideService(){ return IconService.addIconToElement; }
37+
provideService(){ return IconService.addIconToElement; },
38+
39+
suppressFOUC(){ return IconService.suppressFOUC(); }
3840
};

lib/service/icon-service.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,20 @@ class IconService{
2929
addIconToElement(element, path){
3030
return IconNode.forElement(element, path);
3131
}
32+
33+
34+
suppressFOUC(){
35+
return {
36+
iconClassForPath(path){
37+
const file = FileSystem.get(path);
38+
return file.icon.getClasses() || null;
39+
},
40+
41+
onWillDeactivate(){
42+
return new Disposable();
43+
}
44+
}
45+
}
3246
}
3347

3448
IconService.prototype.isReady = false;

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@
3333
"versions": {
3434
"1.0.0": "provideService"
3535
}
36+
},
37+
"atom.file-icons": {
38+
"versions": {
39+
"1.0.0": "suppressFOUC"
40+
}
3641
}
3742
},
3843
"configSchema": {

0 commit comments

Comments
 (0)