Commit 16df1177 authored by Meg Ford's avatar Meg Ford

start implementing loadMore to avoid long load times

parent 49ef42f2
......@@ -169,7 +169,7 @@ const Listview = new Lang.Class({
},
getItemCount: function() {
log(allFilesInfo.length);
log(allFilesInfo.length + "item count");
return allFilesInfo.length;
},
......@@ -220,7 +220,7 @@ const Listview = new Lang.Class({
let dateTimeTag = this.tagInfo.get_date_time('datetime')[1];
let title = this.tagInfo.get_string('title')[1];
let durationInfo = info.get_duration();
//log(durationInfo);
log(durationInfo + "duration from listview");
this.file.duration = durationInfo;
if (title != null) {
......
......@@ -402,6 +402,8 @@ const MainView = new Lang.Class({
margin_top: 5,
name: "PlayDurationLabel" });
this.fileDuration = this._formatTime(this._files[i].duration/Gst.SECOND);
log(this.fileDuration + "FILEDURATION");
log(this._files[i].duration);
this.playDurationLabel.label = this.fileDuration;
this._playLabelBox.pack_start(this.playDurationLabel, false, true, 0);
this.playDurationLabel.show();
......@@ -495,13 +497,13 @@ const MainView = new Lang.Class({
this.selectionRow = this._separator.get_parent();
this.selectionRow.set_sensitive(false);
this._separator.show();
list.monitorListview();
}
list.monitorListview();
},
addLoadMoreButton: function() {
this.loadMoreButton = new LoadMoreButton();
this.loadMoreButton.connect('clicked', Lang.bind(this, this.loadMoreButton.onLoadMore));
//this.loadMoreButton.connect('clicked', Lang.bind(this, this.loadMoreButton.onLoadMore));
this.groupGrid.add(this.loadMoreButton);
this.loadMoreButton.show();
},
......@@ -739,15 +741,14 @@ const LoadMoreButton = new Lang.Class({
let label = new Gtk.Label({ label: _("Load More"),
visible: true });
//this.widget = new Gtk.Button();
this.label = _("Load More");
this.get_style_context().add_class('documents-load-more');
},
onLoadMore: function() {
offsetController.increaseOffset();
//offsetController.increaseOffset();
UpperBoundVal += 182;
view.scrollbar.set_upper(UpperBoundVal);
view.listBoxRefresh();
//view.listBoxRefresh();
}
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment