Browse Source

bugfix refresh + load more on user profile timeline

Carsten Porth 6 years ago
parent
commit
4e6f773c98

+ 1 - 1
app/src/components/profile-header/profile-header.html

@@ -3,7 +3,7 @@
   <div class="profile-banner" [style.background]="'url('+ user.profile_banner_url +')'">
     <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px"
       viewBox="0 0 300 100" xml:space="preserve" width="100%" class="svg-triangle">
-      <polygon points="0,75  0,100 300,100" fill="#FFFFFF" />
+      <polygon points="0,75  0,100 300,100 300,99" fill="#FFFFFF" />
     </svg>
     <img src="{{ user.profile_image_url_https }}" alt="{{ user.name }}" class="avatar">
   </div>

+ 2 - 2
app/src/pages/profile/profile.ts

@@ -44,7 +44,7 @@ export class ProfilePage {
   doRefresh(refresher) {
     this.twitter.fetchUserTimeline(this.userId)
       .then(res => {
-        this.tweets = res.data;
+        this.tweets = res;
         refresher.complete();
       })
   }
@@ -52,7 +52,7 @@ export class ProfilePage {
   loadMore(infiniteScroll: InfiniteScroll) {
     this.twitter.fetchUserTimelineSince(this.userId, this.tweets[this.tweets.length - 1].id)
       .then(res => {
-        this.tweets = this.tweets.concat(res.data);
+        this.tweets = this.tweets.concat(res);
         infiniteScroll.complete();
       })
   }