OLD | NEW |
1 part of swarmlib; | |
2 | |
3 // 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 |
4 // 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 |
5 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
6 | 4 |
7 /** The top-level collection of all sections for a user. */ | 5 /** The top-level collection of all sections for a user. */ |
8 // TODO(jimhug): This is known as UserData in the server model. | 6 // TODO(jimhug): This is known as UserData in the server model. |
9 class Sections implements Collection<Section> { | 7 class Sections implements Collection<Section> { |
10 final List<Section> _sections; | 8 final List<Section> _sections; |
11 | 9 |
12 Sections(this._sections); | 10 Sections(this._sections); |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 final hasThumbnail = decoder.readBool(); | 239 final hasThumbnail = decoder.readBool(); |
242 final author = decoder.readString(); | 240 final author = decoder.readString(); |
243 final dateInSeconds = decoder.readInt(); | 241 final dateInSeconds = decoder.readInt(); |
244 final snippet = decoder.readString(); | 242 final snippet = decoder.readString(); |
245 final date = | 243 final date = |
246 new Date.fromMillisecondsSinceEpoch(dateInSeconds*1000, isUtc: true); | 244 new Date.fromMillisecondsSinceEpoch(dateInSeconds*1000, isUtc: true); |
247 return new Article(source, id, date, title, author, srcUrl, hasThumbnail, | 245 return new Article(source, id, date, title, author, srcUrl, hasThumbnail, |
248 snippet); | 246 snippet); |
249 } | 247 } |
250 } | 248 } |
OLD | NEW |