From f0776a80fc854bb8fd4dd86d9a6310468e8f5d2d Mon Sep 17 00:00:00 2001
From: syuilo <syuilotan@yahoo.co.jp>
Date: Fri, 24 Feb 2017 00:18:33 +0900
Subject: [PATCH] [Client] Fix bug

---
 src/web/app/desktop/tags/drive/browser.tag | 9 +++++++--
 src/web/app/mobile/tags/drive.tag          | 9 +++++++--
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/src/web/app/desktop/tags/drive/browser.tag b/src/web/app/desktop/tags/drive/browser.tag
index afaa452ed..7eaa7ed6e 100644
--- a/src/web/app/desktop/tags/drive/browser.tag
+++ b/src/web/app/desktop/tags/drive/browser.tag
@@ -613,6 +613,11 @@
 			this.update();
 		};
 
+		this.appendFile = file => this.addFile(file);
+		this.appendFolder = file => this.addFolder(file);
+		this.prependFile = file => this.addFile(file, true);
+		this.prependFolder = file => this.addFolder(file, true);
+
 		this.goRoot = () => {
 			// 既にrootにいるなら何もしない
 			if (this.folder == null) return;
@@ -668,8 +673,8 @@
 			let flag = false;
 			const complete = () => {
 				if (flag) {
-					fetchedFolders.forEach(this.addFolder);
-					fetchedFiles.forEach(this.addFile);
+					fetchedFolders.forEach(this.appendFolder);
+					fetchedFiles.forEach(this.appendFile);
 					this.update({
 						fetching: false
 					});
diff --git a/src/web/app/mobile/tags/drive.tag b/src/web/app/mobile/tags/drive.tag
index 051482ae1..e3b41ab64 100644
--- a/src/web/app/mobile/tags/drive.tag
+++ b/src/web/app/mobile/tags/drive.tag
@@ -277,6 +277,11 @@
 			this.update();
 		};
 
+		this.appendFile = file => this.addFile(file);
+		this.appendFolder = file => this.addFolder(file);
+		this.prependFile = file => this.addFile(file, true);
+		this.prependFolder = file => this.addFolder(file, true);
+
 		this.goRoot = () => {
 			if (this.folder || this.file) {
 				this.update({
@@ -335,8 +340,8 @@
 			let flag = false;
 			const complete = () => {
 				if (flag) {
-					fetchedFolders.forEach(this.addFolder);
-					fetchedFiles.forEach(this.addFile);
+					fetchedFolders.forEach(this.appendFolder);
+					fetchedFiles.forEach(this.appendFile);
 					this.update({
 						fetching: false
 					});