|
5 | 5 | #name : #SPOCRecentlyPlayed,
|
6 | 6 | #superclass : #SPOCUIComponent,
|
7 | 7 | #instVars : [
|
8 |
| - 'tracks', |
9 |
| - 'trackItems' |
| 8 | + 'results' |
10 | 9 | ],
|
11 | 10 | #category : #'SpotifyConnect-UI',
|
12 | 11 | #'squeak_changestamp' : 'OW 7/4/2024 12:12'
|
@@ -43,67 +42,48 @@ SPOCRecentlyPlayed >> attachButton [
|
43 | 42 |
|
44 | 43 | {
|
45 | 44 | #category : #'api-call',
|
46 |
| - #'squeak_changestamp' : 'VE 7/2/2024 18:56' |
| 45 | + #'squeak_changestamp' : 'TL 7/11/2024 12:03' |
47 | 46 | }
|
48 | 47 | SPOCRecentlyPlayed >> getRecentlyPlayed [
|
49 | 48 |
|
50 | 49 | | apiEndpoint |
|
51 |
| - self isDisabled ifTrue: [self showPopUp. ^ self]. |
52 |
| - apiEndpoint := SPOCApiRecentlyPlayed new |
53 |
| - authorizer: self app auth; |
54 |
| - yourself. |
55 |
| - self results: (apiEndpoint getRecentlyPlayed). |
| 50 | + self isDisabled |
| 51 | + ifTrue: [self showPopUp. |
| 52 | + ^ self]. |
| 53 | + apiEndpoint := SPOCApiRecentlyPlayed new authorizer: self app auth. |
| 54 | + self results: apiEndpoint getRecentlyPlayed. |
56 | 55 | self app resultList updateResults: self results;
|
57 | 56 | title: 'Recently Played'
|
58 | 57 | ]
|
59 | 58 |
|
60 | 59 | {
|
61 | 60 | #category : #initialization,
|
62 |
| - #'squeak_changestamp' : 'TL 7/8/2024 19:39' |
| 61 | + #'squeak_changestamp' : 'TL 7/11/2024 11:59' |
63 | 62 | }
|
64 | 63 | SPOCRecentlyPlayed >> initialize [
|
65 | 64 |
|
66 | 65 | super initialize.
|
67 | 66 |
|
68 | 67 | self color: Color transparent;
|
69 |
| - items: OrderedCollection new; |
70 | 68 | results: OrderedCollection new;
|
71 | 69 | attachButton;
|
72 | 70 | extendFully
|
73 | 71 | ]
|
74 | 72 |
|
75 | 73 | {
|
76 | 74 | #category : #accessing,
|
77 |
| - #'squeak_changestamp' : 'TL 7/8/2024 19:16' |
78 |
| -} |
79 |
| -SPOCRecentlyPlayed >> items [ |
80 |
| - |
81 |
| - ^ trackItems |
82 |
| -] |
83 |
| - |
84 |
| -{ |
85 |
| - #category : #accessing, |
86 |
| - #'squeak_changestamp' : 'TL 7/8/2024 19:16' |
87 |
| -} |
88 |
| -SPOCRecentlyPlayed >> items: anObject [ |
89 |
| - |
90 |
| - trackItems := anObject |
91 |
| -] |
92 |
| - |
93 |
| -{ |
94 |
| - #category : #accessing, |
95 |
| - #'squeak_changestamp' : 'TL 7/8/2024 19:16' |
| 75 | + #'squeak_changestamp' : 'TL 7/11/2024 12:02' |
96 | 76 | }
|
97 | 77 | SPOCRecentlyPlayed >> results [
|
98 | 78 |
|
99 |
| - ^ tracks |
| 79 | + ^ results |
100 | 80 | ]
|
101 | 81 |
|
102 | 82 | {
|
103 | 83 | #category : #accessing,
|
104 |
| - #'squeak_changestamp' : 'TL 7/8/2024 19:16' |
| 84 | + #'squeak_changestamp' : 'TL 7/11/2024 12:02' |
105 | 85 | }
|
106 | 86 | SPOCRecentlyPlayed >> results: anObject [
|
107 | 87 |
|
108 |
| - tracks := anObject |
| 88 | + results := anObject |
109 | 89 | ]
|
0 commit comments