@@ -110,21 +110,41 @@ public function parseShortVersion(IEvent $event, IEvent $previousEvent = null) {
110110
111111 if ($ event ->getSubject () === 'created_by ' ) {
112112 $ subject = $ this ->l ->t ('Created by {user} ' );
113- $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'add-color.svg ' )));
113+ if ($ this ->activityManager ->getRequirePNG ()) {
114+ $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'add-color.png ' )));
115+ } else {
116+ $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'add-color.svg ' )));
117+ }
114118 } else if ($ event ->getSubject () === 'changed_by ' ) {
115119 $ subject = $ this ->l ->t ('Changed by {user} ' );
116- $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'change.svg ' )));
120+ if ($ this ->activityManager ->getRequirePNG ()) {
121+ $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'change.png ' )));
122+ } else {
123+ $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'change.svg ' )));
124+ }
117125 } else if ($ event ->getSubject () === 'deleted_by ' ) {
118126 $ subject = $ this ->l ->t ('Deleted by {user} ' );
119- $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'delete-color.svg ' )));
127+ if ($ this ->activityManager ->getRequirePNG ()) {
128+ $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'delete-color.png ' )));
129+ } else {
130+ $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'delete-color.svg ' )));
131+ }
120132 } else if ($ event ->getSubject () === 'restored_by ' ) {
121133 $ subject = $ this ->l ->t ('Restored by {user} ' );
122134 } else if ($ event ->getSubject () === 'renamed_by ' ) {
123135 $ subject = $ this ->l ->t ('Renamed by {user} ' );
124- $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'change.svg ' )));
136+ if ($ this ->activityManager ->getRequirePNG ()) {
137+ $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'change.png ' )));
138+ } else {
139+ $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'change.svg ' )));
140+ }
125141 } else if ($ event ->getSubject () === 'moved_by ' ) {
126142 $ subject = $ this ->l ->t ('Moved by {user} ' );
127- $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'change.svg ' )));
143+ if ($ this ->activityManager ->getRequirePNG ()) {
144+ $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'change.png ' )));
145+ } else {
146+ $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'change.svg ' )));
147+ }
128148 } else {
129149 throw new \InvalidArgumentException ();
130150 }
@@ -151,41 +171,85 @@ public function parseLongVersion(IEvent $event, IEvent $previousEvent = null) {
151171
152172 if ($ event ->getSubject () === 'created_self ' ) {
153173 $ subject = $ this ->l ->t ('You created {file} ' );
154- $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'add-color.svg ' )));
174+ if ($ this ->activityManager ->getRequirePNG ()) {
175+ $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'add-color.png ' )));
176+ } else {
177+ $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'add-color.svg ' )));
178+ }
155179 } else if ($ event ->getSubject () === 'created_by ' ) {
156180 $ subject = $ this ->l ->t ('{user} created {file} ' );
157- $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'add-color.svg ' )));
181+ if ($ this ->activityManager ->getRequirePNG ()) {
182+ $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'add-color.png ' )));
183+ } else {
184+ $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'add-color.svg ' )));
185+ }
158186 } else if ($ event ->getSubject () === 'created_public ' ) {
159187 $ subject = $ this ->l ->t ('{file} was created in a public folder ' );
160- $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'add-color.svg ' )));
188+ if ($ this ->activityManager ->getRequirePNG ()) {
189+ $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'add-color.png ' )));
190+ } else {
191+ $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'add-color.svg ' )));
192+ }
161193 } else if ($ event ->getSubject () === 'changed_self ' ) {
162194 $ subject = $ this ->l ->t ('You changed {file} ' );
163- $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'change.svg ' )));
195+ if ($ this ->activityManager ->getRequirePNG ()) {
196+ $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'change.png ' )));
197+ } else {
198+ $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'change.svg ' )));
199+ }
164200 } else if ($ event ->getSubject () === 'changed_by ' ) {
165201 $ subject = $ this ->l ->t ('{user} changed {file} ' );
166- $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'change.svg ' )));
202+ if ($ this ->activityManager ->getRequirePNG ()) {
203+ $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'change.png ' )));
204+ } else {
205+ $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'change.svg ' )));
206+ }
167207 } else if ($ event ->getSubject () === 'deleted_self ' ) {
168208 $ subject = $ this ->l ->t ('You deleted {file} ' );
169- $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'delete-color.svg ' )));
209+ if ($ this ->activityManager ->getRequirePNG ()) {
210+ $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'delete-color.png ' )));
211+ } else {
212+ $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'delete-color.svg ' )));
213+ }
170214 } else if ($ event ->getSubject () === 'deleted_by ' ) {
171215 $ subject = $ this ->l ->t ('{user} deleted {file} ' );
172- $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'delete-color.svg ' )));
216+ if ($ this ->activityManager ->getRequirePNG ()) {
217+ $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'delete-color.png ' )));
218+ } else {
219+ $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'delete-color.svg ' )));
220+ }
173221 } else if ($ event ->getSubject () === 'restored_self ' ) {
174222 $ subject = $ this ->l ->t ('You restored {file} ' );
175223 } else if ($ event ->getSubject () === 'restored_by ' ) {
176224 $ subject = $ this ->l ->t ('{user} restored {file} ' );
177225 } else if ($ event ->getSubject () === 'renamed_self ' ) {
178226 $ subject = $ this ->l ->t ('You renamed {oldfile} to {newfile} ' );
179- $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'change.svg ' )));
227+ if ($ this ->activityManager ->getRequirePNG ()) {
228+ $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'change.png ' )));
229+ } else {
230+ $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'change.svg ' )));
231+ }
180232 } else if ($ event ->getSubject () === 'renamed_by ' ) {
181233 $ subject = $ this ->l ->t ('{user} renamed {oldfile} to {newfile} ' );
182- $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'change.svg ' )));
234+ if ($ this ->activityManager ->getRequirePNG ()) {
235+ $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'change.png ' )));
236+ } else {
237+ $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'change.svg ' )));
238+ }
183239 } else if ($ event ->getSubject () === 'moved_self ' ) {
184240 $ subject = $ this ->l ->t ('You moved {oldfile} to {newfile} ' );
185- $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'change.svg ' )));
241+ if ($ this ->activityManager ->getRequirePNG ()) {
242+ $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'change.png ' )));
243+ } else {
244+ $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'change.svg ' )));
245+ }
186246 } else if ($ event ->getSubject () === 'moved_by ' ) {
187247 $ subject = $ this ->l ->t ('{user} moved {oldfile} to {newfile} ' );
188- $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'change.svg ' )));
248+ if ($ this ->activityManager ->getRequirePNG ()) {
249+ $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'change.png ' )));
250+ } else {
251+ $ event ->setIcon ($ this ->url ->getAbsoluteURL ($ this ->url ->imagePath ('files ' , 'change.svg ' )));
252+ }
189253 } else {
190254 throw new \InvalidArgumentException ();
191255 }
0 commit comments