Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Unified Diff: samples/github/lib/src/commit_presenter.dart

Issue 2035023003: Remove service-compiler related code. (Closed) Base URL: git@github.com:dartino/sdk.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samples/github/lib/src/commit_list_presenter.dart ('k') | samples/github/lib/src/commit_presenter.immi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/github/lib/src/commit_presenter.dart
diff --git a/samples/github/lib/src/commit_presenter.dart b/samples/github/lib/src/commit_presenter.dart
deleted file mode 100644
index a9817b02b71a7c46e14c6d15c3556746fab34b46..0000000000000000000000000000000000000000
--- a/samples/github/lib/src/commit_presenter.dart
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'github_services.dart';
-
-import 'package:immi/dart/immi.dart';
-import 'package:immi/dart/image.dart';
-
-import 'package:immi_samples/sequenced_presenter.dart';
-
-// Export generated code for nodes in commit_presenter.immi
-import 'package:immi/dart/commit_presenter.dart';
-export 'package:immi/dart/commit_presenter.dart';
-
-class CommitPresenter extends SequencedPresenter<CommitNode> {
- Repository _repository;
- Set<int> selectedIndices = new Set<int>();
-
- CommitPresenter(this._repository);
-
- void toggleAt(int index) {
- if (selectedIndices.contains(index)) {
- selectedIndices.remove(index);
- } else {
- selectedIndices.add(index);
- }
- }
-
- CommitNode presentAt(int index) {
- Map<String, dynamic> json = _repository.getCommitAt(index);
- if (json == null) return null;
-
- String imageUrl = json['author'] == null
- ? ""
- : json['author']['avatar_url'];
-
- return new CommitNode(
- author: json['commit']['author']['name'],
- message: json['commit']['message'],
- selected: selectedIndices.contains(index),
- image: new ImageNode(url: imageUrl));
- }
-}
« no previous file with comments | « samples/github/lib/src/commit_list_presenter.dart ('k') | samples/github/lib/src/commit_presenter.immi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698