This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Telegram - Jump to first unread message | |
// @namespace https://ivanmorgillo.com/ | |
// @version 0.1 | |
// @description Kinda Slack shortcut | |
// @author Ivan Morgillo | |
// @match https://web.telegram.org/* | |
// @grant none | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Target(AnnotationTarget.CLASS) | |
@Retention(AnnotationRetention.SOURCE) | |
/** | |
* Friendly reminder that this might not be the best place to do major changes. Or any changes at all. | |
* Use the [reason] arg to point your teammates and your future-self to some documentation. | |
*/ | |
annotation class HereBeDragons(val reason: String) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.net.Uri | |
import java.io.File | |
/** | |
* Tries to convert a [String] to a [Uri]. | |
* Differently from the "I'm 5 years old" implementation that comes with Android | |
* that throws a temper tantrum, i.e. exception, if the conversion fails, | |
* this implementation returns a [null], like an adult would do. | |
*/ | |
@Suppress("SwallowedException", "TooGenericExceptionCaught") |
OlderNewer