File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
desktop/src/main/scala/org/talkingpuffin Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -125,8 +125,6 @@ class TweetDetailPanel(session: Session,
125125 }.peer)
126126 }
127127
128- private def getFiltersDialog : Option [FiltersDialog ] = None
129-
130128 private def showStatusDetails (userAndStatus : UserAndStatus , filtersDialog : Option [FiltersDialog ]) {
131129 session.clearMessage()
132130 setText(userAndStatus.origUser, userAndStatus.status)
@@ -142,9 +140,11 @@ class TweetDetailPanel(session: Session,
142140 userAndStatus.retweetingUser))
143141
144142 if (GlobalPrefs .isOn(PrefKeys .EXPAND_URLS )) {
145- def replaceUrl (shortUrl : String , fullUrl : String ) = {
143+ def urlWithoutRequestParams (url : String ) = url.split(" \\ ?" )(0 )
144+
145+ def replaceUrl (shortUrl : String , fullUrl : String ) {
146146 val beforeText = largeTweet.getText
147- val afterText = beforeText.replace(shortUrl, fullUrl)
147+ val afterText = beforeText.replace(shortUrl, urlWithoutRequestParams( fullUrl) )
148148 if (beforeText != afterText) {
149149 largeTweet setText afterText
150150 largeTweet setCaretPosition 0
Original file line number Diff line number Diff line change @@ -49,11 +49,10 @@ object ShortUrl extends Loggable {
4949 val matcher = LinkExtractor .hyperlinkPattern.matcher(text)
5050 while (matcher.find) {
5151 val sourceUrl = matcher.group(1 )
52- expandUrl(sourceUrl, (targetUrl : String ) => { provideSourceAndTargetUrl(sourceUrl, targetUrl)} )
52+ expandUrl(sourceUrl, (targetUrl : String ) => provideSourceAndTargetUrl(sourceUrl, targetUrl))
5353 }
5454 }
5555
5656 private def urlIsShortened (url : String ) = shortenerHosts.exists(url.contains(_)) ||
5757 shortenerRegexes.exists(r => url match {case r() => true case _ => false })
58-
5958}
You can’t perform that action at this time.
0 commit comments