| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // TODO(jacobr): there is a lot of dead code in this class. Checking is as is | 5 // TODO(jacobr): there is a lot of dead code in this class. Checking is as is |
| 6 // and then doing a large pass to remove functionality that doesn't make sense | 6 // and then doing a large pass to remove functionality that doesn't make sense |
| 7 // given the UI layout. | 7 // given the UI layout. |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Front page of Swarm. | 10 * Front page of Swarm. |
| (...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 930 pageNumberView = addChild(new PageNumberView(pageState)); | 930 pageNumberView = addChild(new PageNumberView(pageState)); |
| 931 | 931 |
| 932 node.style.opacity = '1'; | 932 node.style.opacity = '1'; |
| 933 } else { | 933 } else { |
| 934 addChild(dataSourceView); | 934 addChild(dataSourceView); |
| 935 addChild(pageNumberView); | 935 addChild(pageNumberView); |
| 936 node.style.opacity = '1'; | 936 node.style.opacity = '1'; |
| 937 } | 937 } |
| 938 | 938 |
| 939 // TODO(jacobr): get rid of this call to reconfigure when it is not needed. | 939 // TODO(jacobr): get rid of this call to reconfigure when it is not needed. |
| 940 dataSourceView.scroller.reconfigure(); | 940 dataSourceView.scroller.reconfigure(() {}); |
| 941 } | 941 } |
| 942 | 942 |
| 943 /** | 943 /** |
| 944 * Hides the data sources and shows the loading text. | 944 * Hides the data sources and shows the loading text. |
| 945 */ | 945 */ |
| 946 void hideSources() { | 946 void hideSources() { |
| 947 if (dataSourceView != null) { | 947 if (dataSourceView != null) { |
| 948 node.style.opacity = '0.6'; | 948 node.style.opacity = '0.6'; |
| 949 removeChild(dataSourceView); | 949 removeChild(dataSourceView); |
| 950 removeChild(pageNumberView); | 950 removeChild(pageNumberView); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 966 * [Feed]. | 966 * [Feed]. |
| 967 */ | 967 */ |
| 968 DataSourceView findView(Feed dataSource) { | 968 DataSourceView findView(Feed dataSource) { |
| 969 return dataSourceView.getSubview(dataSourceView.findIndex(dataSource)); | 969 return dataSourceView.getSubview(dataSourceView.findIndex(dataSource)); |
| 970 } | 970 } |
| 971 | 971 |
| 972 bool inCurrentView(Article article) { | 972 bool inCurrentView(Article article) { |
| 973 return dataSourceView.findIndex(article.dataSource) != null; | 973 return dataSourceView.findIndex(article.dataSource) != null; |
| 974 } | 974 } |
| 975 } | 975 } |
| OLD | NEW |