aboutsummaryrefslogtreecommitdiffstats
path: root/bin/gtk-fair-viewer
diff options
context:
space:
mode:
Diffstat (limited to 'bin/gtk-fair-viewer')
-rwxr-xr-xbin/gtk-fair-viewer15
1 files changed, 10 insertions, 5 deletions
diff --git a/bin/gtk-fair-viewer b/bin/gtk-fair-viewer
index bc9c747..42ab174 100755
--- a/bin/gtk-fair-viewer
+++ b/bin/gtk-fair-viewer
@@ -2404,16 +2404,14 @@ sub make_row_description {
}
sub append_next_page {
- my ($url) = @_;
-
- #$token // return; # no next page is available
-
+ my ($url, $continuation) = @_;
my $iter = $liststore->append;
$liststore->set(
$iter,
0 => "<big><b>LOAD MORE</b></big>",
3 => $url,
+ 5 => $continuation,
7 => 'next_page',
);
}
@@ -2663,7 +2661,14 @@ sub display_results {
}
}
- append_next_page($url); #, #$info->{nextPageToken});
+ if (ref($results->{results}) eq 'HASH' and exists($results->{results}{continuation})) {
+ if (defined $results->{results}{continuation}) {
+ append_next_page($url, $results->{results}{continuation});
+ }
+ }
+ else {
+ append_next_page($url);
+ }
}
sub set_entry_tooltip {